[PATCH v3 1/2] powerpc: Detect the presence of big-cores via "ibm, thread-groups"

Joe Perches joe at perches.com
Mon Jul 9 13:52:39 AEST 2018


On Sun, 2018-07-08 at 13:03 -0300, Murilo Opsfelder Araujo wrote:
> On Fri, Jul 06, 2018 at 02:35:48PM +0530, Gautham R. Shenoy wrote:
> > From: "Gautham R. Shenoy" <ego at linux.vnet.ibm.com>
> > 
> > On IBM POWER9, the device tree exposes a property array identifed by
> > "ibm,thread-groups" which will indicate which groups of threads share a
> > particular set of resources.
[]
> > diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
[]
> > @@ -1025,6 +1026,33 @@ static ssize_t show_physical_id(struct device *dev,
> >  }
> >  static DEVICE_ATTR(physical_id, 0444, show_physical_id, NULL);
> >  
> > +static ssize_t show_small_core_siblings(struct device *dev,
> > +					struct device_attribute *attr,
> > +					char *buf)
> > +{
> 
> Interesting enough, checkpatch.pl warned about this function name:
> 
>     WARNING: Consider renaming function(s) 'show_small_core_siblings' to 'small_core_siblings_show'
>     #354: FILE: arch/powerpc/kernel/sysfs.c:1053:
>     +}

It's to allow the DEVICE_ATTR below to be renamed to DEVICE_ATTR_RO 

> > +static DEVICE_ATTR(small_core_siblings, 0444, show_small_core_siblings, NULL);

So this becomes 

DEVICE_ATTR_RO(small_core_siblings)



More information about the Linuxppc-dev mailing list