[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200320145906.GA762057@kroah.com>
Date: Fri, 20 Mar 2020 15:59:06 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.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>, linux-acpi@...r.kernel.org,
Viresh Kumar <viresh.kumar@...aro.org>,
linux-pm@...r.kernel.org,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
linux-edac@...r.kernel.org, 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@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
linux-pci@...r.kernel.org, Takashi Iwai <tiwai@...e.com>,
alsa-devel@...a-project.org,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
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 02:13:45PM +0100, Thomas Gleixner 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.
>
> 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?
Much nicer looking, thanks for cleaning up this mess:
Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Powered by blists - more mailing lists