[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vffg5jm5knwuAKwkDZ16=kDujT1LCpzGU8mUV9NrXkSag@mail.gmail.com>
Date: Fri, 20 Mar 2020 16:31:42 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mark Gross <mgross@...ux.intel.com>,
Tony Luck <tony.luck@...el.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Darren Hart <dvhart@...radead.org>,
Andy Shevchenko <andy@...radead.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <lenb@...nel.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Linux PM <linux-pm@...r.kernel.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
linux-edac@...r.kernel.org,
Platform Driver <platform-driver-x86@...r.kernel.org>,
Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>,
linux-hwmon@...r.kernel.org, Zhang Rui <rui.zhang@...el.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Amit Kucheria <amit.kucheria@...durent.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Jacob Pan <jacob.jun.pan@...ux.intel.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
linux-mmc <linux-mmc@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
Takashi Iwai <tiwai@...e.com>,
ALSA Development Mailing List <alsa-devel@...a-project.org>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
linux-crypto <linux-crypto@...r.kernel.org>
Subject: Re: [patch 00/22] x86/treewide: Consolidate CPU match macro maze and
get rid of C89 (sic!) initializers
On Fri, Mar 20, 2020 at 3:19 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> The x86 CPU matching based on struct x86_cpu_id:
>
> - is using an inconsistent macro mess with pointlessly duplicated and
> slightly different local macros. Finding the places is an art as there
> is no consistent name space at all.
>
> - is still mostly based on C89 struct initializers which rely on the
> ordering of the struct members. That's proliferated forever as every
> new driver just copies the mess from some exising one.
>
> A recent offlist conversation about adding more match criteria to the CPU
> matching logic instead of creating yet another set of horrors, reminded me
> of a pile of scripts and patches which I hacked on a few years ago when I
> tried to add something to struct x86_cpu_id.
>
> That stuff was finally not needed and ended up in my ever growing todo list
> and collected dust and cobwebs, but (un)surprisingly enough most of it
> still worked out of the box. The copy & paste machinery still works as it
> did years ago.
>
> There are a few places which needed extra care due to new creative macros,
> new check combinations etc. and surprisingly ONE open coded proper C99
> initializer.
>
> It was reasonably simple to make it at least compile and pass a quick
> binary equivalence check.
>
> The result is a X86_MATCH prefix based set of macros which are reflecting
> the needs of the usage sites and shorten the base macro which takes all
> possible parameters (vendor, family, model, feature, data) and uses proper
> C99 initializers.
>
> So extensions of the match logic are trivial after that.
>
Thank you, Thomas!
Briefly looking to the code, I like the idea. I'll do (minor) comments
on individual patches.
I see it incorporates my previous attempts to extend this, but now it
looks better.
> The patch set is against Linus tree and has trivial conflicts against
> linux-next.
>
> The diffstat is:
> 71 files changed, 525 insertions(+), 472 deletions(-)
>
> but the extra lines are pretty much kernel-doc documentation which I added
> to each of the new macros. The usage sites diffstat is:
>
> 70 files changed, 393 insertions(+), 471 deletions(-)
>
> Thoughts?
>
> Thanks,
>
> tglx
>
>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists