linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	tsbogend@alpha.franken.de, linux-api@vger.kernel.org,
	f.fainelli@gmail.com
Subject: Re: [PATCH v4] MIPS: Expose prid and globalnumber to sysfs
Date: Tue, 16 Aug 2022 11:21:01 +0200	[thread overview]
Message-ID: <YvthfQUfv0TiO/bK@kroah.com> (raw)
In-Reply-To: <20220816091258.9571-1-jiaxun.yang@flygoat.com>

On Tue, Aug 16, 2022 at 09:12:58AM +0000, Jiaxun Yang wrote:
> Some application would like to know precise model and rev of processor
> to do errata workaround or optimization.
> 
> Expose them in sysfs as:
> /sys/devices/system/cpu/cpuX/regs/identification/prid
> /sys/devices/system/cpu/cpuX/regs/identification/globalnumber
> 
> Reusing AArch64 CPU registers directory.
> 
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
> v2: Drop static qualifier for kobj (gregkh)
> v3: Use kzalloc to allocate struct cpuregs.
>     note: When Greg mentioned about static I was thinking about
>     static qualifier of percpu variable. After reading documents
>     again it turns out kobjs should be allocated at runtime. Arm64's
>     cpuinfo kobj is also on a percpu variable... I guess that was a
>     intentional use?
> v4: Properly handle err of kobj creation. (gregkh)

Nothing was fixed :(

Again, please read the documentation for the kobject calls you are
making as it explains how to properly handle errors being returned from
them, and what you need to call if that happens.

thanks,

greg k-h

  reply	other threads:[~2022-08-16 10:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-16  9:12 [PATCH v4] MIPS: Expose prid and globalnumber to sysfs Jiaxun Yang
2022-08-16  9:21 ` Greg KH [this message]
     [not found]   ` <BA886B5F-EE3B-4227-AC3C-E7FBAAA98ECB@flygoat.com>
2022-08-16 11:55     ` Greg KH
2022-08-16 12:38   ` Jiaxun Yang
2022-08-16 12:42     ` Greg KH

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=YvthfQUfv0TiO/bK@kroah.com \
    --to=greg@kroah.com \
    --cc=f.fainelli@gmail.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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).