All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 00/22] x86/treewide: Consolidate CPU match macro maze and get rid of C89 (sic!) initializers
@ 2020-03-20 13:13 ` Thomas Gleixner
  0 siblings, 0 replies; 161+ messages in thread
From: Thomas Gleixner @ 2020-03-20 13:13 UTC (permalink / raw)
  To: LKML
  Cc: x86, Greg Kroah-Hartman, Mark Gross, Tony Luck, Paolo Bonzini,
	Darren Hart, Andy Shevchenko, Rafael J. Wysocki, Len Brown,
	linux-acpi, Viresh Kumar, linux-pm, Srinivas Pandruvada,
	linux-edac, platform-driver-x86, Jean Delvare, Guenter Roeck,
	linux-hwmon, Zhang Rui, Daniel Lezcano, Amit Kucheria,
	Chanwoo Choi, Jacob Pan, Adrian Hunter, Ulf Hansson, linux-mmc,
	Bjorn Helgaas, linux-pci, Takashi Iwai, alsa-devel, Herbert Xu,
	David S. Miller, linux-crypto

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?

Thanks,

	tglx



^ permalink raw reply	[flat|nested] 161+ messages in thread

end of thread, other threads:[~2020-04-13  8:40 UTC | newest]

Thread overview: 161+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-20 13:13 [patch 00/22] x86/treewide: Consolidate CPU match macro maze and get rid of C89 (sic!) initializers Thomas Gleixner
2020-03-20 13:13 ` Thomas Gleixner
2020-03-20 13:13 ` [patch 01/22] x86/devicetable: Move x86 specific macro out of generic code Thomas Gleixner
2020-03-20 13:13   ` Thomas Gleixner
2020-03-20 14:33   ` Andy Shevchenko
2020-03-20 14:33     ` Andy Shevchenko
2020-03-20 14:33     ` Andy Shevchenko
2020-03-20 20:24     ` Thomas Gleixner
2020-03-20 20:24       ` Thomas Gleixner
2020-03-20 20:24       ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:13 ` [patch 02/22] x86/cpu: Add conistent CPU match macros Thomas Gleixner
2020-03-20 13:13   ` Thomas Gleixner
2020-03-20 14:29   ` Bjorn Helgaas
2020-03-20 14:29     ` Bjorn Helgaas
2020-03-20 14:29     ` Bjorn Helgaas
2020-03-20 14:39   ` Andy Shevchenko
2020-03-20 14:39     ` Andy Shevchenko
2020-03-20 14:39     ` Andy Shevchenko
2020-03-20 20:27     ` Thomas Gleixner
2020-03-20 20:27       ` Thomas Gleixner
2020-03-20 20:27       ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] x86/cpu: Add consistent " tip-bot2 for Thomas Gleixner
2020-03-20 13:13 ` [patch 03/22] x86/cpu/bugs: Convert to new matching macros Thomas Gleixner
2020-03-20 13:13   ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:13 ` [patch 04/22] x86/perf/events: Convert to new CPU match macros Thomas Gleixner
2020-03-20 13:13   ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:13 ` [patch 05/22] x86/kvm: " Thomas Gleixner
2020-03-20 13:13   ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:13 ` [patch 06/22] x86/kernel: " Thomas Gleixner
2020-03-20 13:13   ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:13 ` [patch 07/22] x86/platform: " Thomas Gleixner
2020-03-20 13:13   ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:13 ` [patch 08/22] ACPI: Convert to new X86 " Thomas Gleixner
2020-03-20 13:13   ` Thomas Gleixner
2020-03-20 14:47   ` Andy Shevchenko
2020-03-20 14:47     ` Andy Shevchenko
2020-03-20 14:47     ` Andy Shevchenko
2020-03-20 20:32     ` Thomas Gleixner
2020-03-20 20:32       ` Thomas Gleixner
2020-03-20 20:32       ` Thomas Gleixner
2020-03-23 16:38       ` mark gross
2020-03-23 16:38         ` mark gross
2020-03-23 16:38         ` mark gross
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:13 ` [patch 09/22] cpufreq: " Thomas Gleixner
2020-03-20 13:13   ` Thomas Gleixner
2020-03-20 14:50   ` Andy Shevchenko
2020-03-20 14:50     ` Andy Shevchenko
2020-03-20 14:50     ` Andy Shevchenko
2020-03-20 20:30     ` Thomas Gleixner
2020-03-20 20:30       ` Thomas Gleixner
2020-03-20 20:30       ` Thomas Gleixner
2020-03-20 21:52       ` Andy Shevchenko
2020-03-20 21:52         ` Andy Shevchenko
2020-03-20 21:52         ` Andy Shevchenko
2020-03-20 22:18         ` Thomas Gleixner
2020-03-20 22:18           ` Thomas Gleixner
2020-03-20 22:18           ` Thomas Gleixner
2020-03-24  6:01   ` [cpufreq] 06c4d00466: will-it-scale.per_process_ops -53.4% regression kernel test robot
2020-03-24  6:01     ` kernel test robot
2020-03-24  6:01     ` kernel test robot
2020-03-24  6:01     ` kernel test robot
2020-03-24 10:24     ` Andy Shevchenko
2020-03-24 10:24       ` Andy Shevchenko
2020-03-24 10:24       ` Andy Shevchenko
2020-03-24 10:24       ` Andy Shevchenko
2020-03-24 15:38       ` Srinivas Pandruvada
2020-03-24 15:38         ` Srinivas Pandruvada
2020-03-24 15:38         ` Srinivas Pandruvada
2020-03-24 15:38         ` Srinivas Pandruvada
2020-03-25  7:51         ` Rong Chen
2020-03-25  7:51           ` Rong Chen
2020-03-25  7:51           ` Rong Chen
2020-03-25  7:51           ` Rong Chen
2020-03-25  7:50       ` Rong Chen
2020-03-25  7:50         ` Rong Chen
2020-03-25  7:50         ` Rong Chen
2020-03-25  7:50         ` Rong Chen
2020-03-25 10:32         ` Thomas Gleixner
2020-03-25 10:32           ` Thomas Gleixner
2020-03-25 10:32           ` Thomas Gleixner
2020-03-25 10:32           ` Thomas Gleixner
2020-03-26  8:33           ` kernel test robot
2020-03-26  8:33             ` kernel test robot
2020-03-26  8:33             ` kernel test robot
2020-03-26  8:33             ` kernel test robot
2020-03-25 12:41     ` [tip: x86/cpu] cpufreq/intel_pstate: Fix wrong macro conversion tip-bot2 for Thomas Gleixner
2020-03-24 13:51   ` [patch V2 09/22] cpufreq: Convert to new X86 CPU match macros Thomas Gleixner
2020-03-24 13:51     ` Thomas Gleixner
2020-03-24 13:51     ` Thomas Gleixner
2020-03-24 15:37     ` Rafael J. Wysocki
2020-03-24 15:37       ` Rafael J. Wysocki
2020-03-24 15:37       ` Rafael J. Wysocki
2020-03-24 22:32     ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:13 ` [patch 10/22] EDAC: " Thomas Gleixner
2020-03-20 13:13   ` Thomas Gleixner
2020-03-24 19:31   ` Luck, Tony
2020-03-24 19:31     ` Luck, Tony
2020-03-24 19:31     ` Luck, Tony
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:13 ` [patch 11/22] platform/x86: Convert to new " Thomas Gleixner
2020-03-20 13:13   ` Thomas Gleixner
2020-03-20 14:52   ` Andy Shevchenko
2020-03-20 14:52     ` Andy Shevchenko
2020-03-20 14:52     ` Andy Shevchenko
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:13 ` [patch 12/22] hwmon: Convert to new X86 " Thomas Gleixner
2020-03-20 13:13   ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:13 ` [patch 13/22] thermal: " Thomas Gleixner
2020-03-20 13:13   ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:13 ` [patch 14/22] extcon: axp288: " Thomas Gleixner
2020-03-20 13:13   ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:14 ` [patch 15/22] intel_idle: " Thomas Gleixner
2020-03-20 13:14   ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:14 ` [patch 16/22] mmc: sdhci-acpi: " Thomas Gleixner
2020-03-20 13:14   ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:14 ` [patch 17/22] PCI: intel-mid: " Thomas Gleixner
2020-03-20 13:14   ` Thomas Gleixner
2020-03-20 14:30   ` Bjorn Helgaas
2020-03-20 14:30     ` Bjorn Helgaas
2020-03-20 14:30     ` Bjorn Helgaas
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:14 ` [patch 18/22] powercap/intel_rapl: " Thomas Gleixner
2020-03-20 13:14   ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:14 ` [patch 19/22] ASoC: Intel: " Thomas Gleixner
2020-03-20 13:14   ` Thomas Gleixner
2020-03-20 14:58   ` Andy Shevchenko
2020-03-20 14:58     ` Andy Shevchenko
2020-03-20 14:58     ` Andy Shevchenko
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:14 ` [patch 20/22] crypto: Convert to new " Thomas Gleixner
2020-03-20 13:14   ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 13:14 ` [patch 21/22] hwrng: via_rng - Convert to new X86 " Thomas Gleixner
2020-03-20 13:14   ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] hwrng: via_rng: " tip-bot2 for Thomas Gleixner
2020-03-20 13:14 ` [patch 22/22] x86/cpu: Cleanup the now unused " Thomas Gleixner
2020-03-20 13:14   ` Thomas Gleixner
2020-03-24 22:32   ` [tip: x86/cpu] " tip-bot2 for Thomas Gleixner
2020-03-20 14:31 ` [patch 00/22] x86/treewide: Consolidate CPU match macro maze and get rid of C89 (sic!) initializers Andy Shevchenko
2020-03-20 14:31   ` Andy Shevchenko
2020-03-20 14:31   ` Andy Shevchenko
2020-03-20 14:59 ` Greg Kroah-Hartman
2020-03-20 14:59   ` Greg Kroah-Hartman
2020-03-20 14:59   ` Greg Kroah-Hartman
2020-03-24 18:58 ` [PATCH 23/22] x86/smpboot: Remove the last ICPU() macro Borislav Petkov
2020-03-24 18:58   ` Borislav Petkov
2020-03-24 18:58   ` Borislav Petkov
2020-04-13  8:40   ` [tip: x86/cleanups] " tip-bot2 for Borislav Petkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.