x86/cpu: Introduce INTEL_CPU_FAM*() helper macros
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 29 Jun 2018 19:31:08 +0000 (22:31 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 3 Jul 2018 11:08:20 +0000 (13:08 +0200)
commite2ce67b2b34b6e9d77da2f375dba5b525508f7df
tree881f9a6c4e297a3f4650289448b5e362d4589f60
parentdbd0fbc76c77daac08ddd245afdcbade0d506e19
x86/cpu: Introduce INTEL_CPU_FAM*() helper macros

These macros are often used by drivers and there exists already a lot of
duplication as ICPU() macro across the drivers.

Provide a generic x86 macro for users.

Note, as Ingo Molnar pointed out this has a hidden issue when a driver
needs to preserve const qualifier. Though, it would be addressed
separately at some point.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
Link: https://lkml.kernel.org/r/20180629193113.84425-2-andriy.shevchenko@linux.intel.com
arch/x86/include/asm/intel-family.h