lkml.org 
[lkml]   [2022]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] MIPS: Expose prid and globalnumber to sysfs
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

\
 
 \ /
  Last update: 2022-08-16 12:42    [W:0.039 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site