x86: Sanitize smp_record and move it to x86_init_ops
The x86 quirkification introduced an extra ugly hackery with a variable pointer in the mpparse code. If the pointer is initialized then it is dereferenced and the variable set to 0 or incremented. Create a x86_init_ops function and let the affected numaq code hold the function. Default init is a setup noop. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
@ -320,8 +320,7 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
|
||||
/*
|
||||
* Now process the configuration blocks.
|
||||
*/
|
||||
if (x86_quirks->mpc_record)
|
||||
*x86_quirks->mpc_record = 0;
|
||||
x86_init.mpparse.mpc_record(0);
|
||||
|
||||
while (count < mpc->length) {
|
||||
switch (*mpt) {
|
||||
@ -353,8 +352,7 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
|
||||
count = mpc->length;
|
||||
break;
|
||||
}
|
||||
if (x86_quirks->mpc_record)
|
||||
(*x86_quirks->mpc_record)++;
|
||||
x86_init.mpparse.mpc_record(1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_BIGSMP
|
||||
|
Reference in New Issue
Block a user