lkml.org 
[lkml]   [2022]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] x86/sysfs: Add PPIN in sysfs under cpu topology
On Thu, Jan 20, 2022 at 02:35:51PM +0100, Borislav Petkov wrote:
> On Fri, Jan 07, 2022 at 02:54:42PM -0800, Tony Luck wrote:
> > +#define topology_ppin(cpu) (cpu_data(cpu).ppin)
>
> That looks unused. No need to add it.


It "looks" unused, But thanks to the obscurity of CPP macros using ## to
concatenate tokens it is needed.

This harmless looking line:

define_id_show_func(ppin, "%llx");

is transmogrified by this:

#define define_id_show_func(name, fmt) \
static ssize_t name##_show(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
return sysfs_emit(buf, fmt "\n", topology_##name(dev->id)); \
^^^^^^^^^^^^^^^

This becomes topology_ppin
}


Will fix the other stuff and rebase to latest so part 4 applies.

Thanks for the review.

-Tony

\
 
 \ /
  Last update: 2022-01-20 19:03    [W:0.154 / U:4.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site