Re: [PATCH 0/5] Further sanitize INTEL_FAM6 naming

From: Luck, Tony
Date: Thu Aug 22 2019 - 16:53:15 EST


On Thu, Aug 22, 2019 at 12:23:06PM +0200, Peter Zijlstra wrote:
> Lots of variation has crept in; time to collapse the lot again.

Conceptually good. But I applied the series on top of tip/master
and got a build error:

CC arch/x86/kernel/cpu/common.o
arch/x86/kernel/cpu/common.c:1031:19: error: âINTEL_FAM6_ATOM_SILVERMONT_Xâ undeclared here (not in a function); did you mean âINTEL_FAM6_ATOM_SILVERMONT_Dâ?
VULNWL(INTEL, 6, INTEL_FAM6_##model, whitelist)
^~~~~~~~~~~
arch/x86/kernel/cpu/common.c:1028:35: note: in definition of macro âVULNWLâ
{ X86_VENDOR_##_vendor, _family, _model, X86_FEATURE_ANY, _whitelist }
^~~~~~
arch/x86/kernel/cpu/common.c:1053:2: note: in expansion of macro âVULNWL_INTELâ
VULNWL_INTEL(ATOM_SILVERMONT_X, NO_SSB | NO_L1TF | MSBDS_ONLY | NO_SWAPGS),
^~~~~~~~~~~~
arch/x86/kernel/cpu/common.c:1031:19: error: âINTEL_FAM6_ATOM_GOLDMONT_Xâ undeclared here (not in a function); did you mean âINTEL_FAM6_ATOM_GOLDMONT_Dâ?
VULNWL(INTEL, 6, INTEL_FAM6_##model, whitelist)
^~~~~~~~~~~
arch/x86/kernel/cpu/common.c:1028:35: note: in definition of macro âVULNWLâ
{ X86_VENDOR_##_vendor, _family, _model, X86_FEATURE_ANY, _whitelist }
^~~~~~
arch/x86/kernel/cpu/common.c:1064:2: note: in expansion of macro âVULNWL_INTELâ
VULNWL_INTEL(ATOM_GOLDMONT_X, NO_MDS | NO_L1TF | NO_SWAPGS),
^~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:281: arch/x86/kernel/cpu/common.o] Error 1


Looks like your scripts didn't anticipate the CPP gymnastics like:

#define VULNWL_INTEL(model, whitelist) \
VULNWL(INTEL, 6, INTEL_FAM6_##model, whitelist)

-Tony