mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
e683014c21
Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. The advantage in doing so is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h was the source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each obj-y/bool instance for the presence of either and replace as needed. Build testing revealed a couple implicit header usage issues that were fixed. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20160714001901.31603-5-paul.gortmaker@windriver.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
36 lines
563 B
C
36 lines
563 B
C
#include <linux/types.h>
|
|
#include <linux/export.h>
|
|
|
|
unsigned int x86_family(unsigned int sig)
|
|
{
|
|
unsigned int x86;
|
|
|
|
x86 = (sig >> 8) & 0xf;
|
|
|
|
if (x86 == 0xf)
|
|
x86 += (sig >> 20) & 0xff;
|
|
|
|
return x86;
|
|
}
|
|
EXPORT_SYMBOL_GPL(x86_family);
|
|
|
|
unsigned int x86_model(unsigned int sig)
|
|
{
|
|
unsigned int fam, model;
|
|
|
|
fam = x86_family(sig);
|
|
|
|
model = (sig >> 4) & 0xf;
|
|
|
|
if (fam >= 0x6)
|
|
model += ((sig >> 16) & 0xf) << 4;
|
|
|
|
return model;
|
|
}
|
|
EXPORT_SYMBOL_GPL(x86_model);
|
|
|
|
unsigned int x86_stepping(unsigned int sig)
|
|
{
|
|
return sig & 0xf;
|
|
}
|
|
EXPORT_SYMBOL_GPL(x86_stepping);
|