x86: mpparse.c introduce smp_dump_mptable helper function

smp_read_mpc() and replace_intsrc_all() can use same smp_dump_mptable()
Signed-off-by: default avatarJaswinder Singh Rajput <jaswinderrajput@gmail.com>
parent 7f00a249
...@@ -282,6 +282,14 @@ static void skip_entry(unsigned char **ptr, int *count, int size) ...@@ -282,6 +282,14 @@ static void skip_entry(unsigned char **ptr, int *count, int size)
*count += size; *count += size;
} }
static void __init smp_dump_mptable(struct mpc_table *mpc, unsigned char *mpt)
{
printk(KERN_ERR "Your mptable is wrong, contact your HW vendor!\n"
"type %x\n", *mpt);
print_hex_dump(KERN_ERR, " ", DUMP_PREFIX_ADDRESS, 16,
1, mpc, mpc->length, 1);
}
static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early) static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
{ {
char str[16]; char str[16];
...@@ -340,10 +348,7 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early) ...@@ -340,10 +348,7 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
break; break;
default: default:
/* wrong mptable */ /* wrong mptable */
printk(KERN_ERR "Your mptable is wrong, contact your HW vendor!\n"); smp_dump_mptable(mpc, mpt);
printk(KERN_ERR "type %x\n", *mpt);
print_hex_dump(KERN_ERR, " ", DUMP_PREFIX_ADDRESS, 16,
1, mpc, mpc->length, 1);
count = mpc->length; count = mpc->length;
break; break;
} }
...@@ -910,10 +915,7 @@ static int __init replace_intsrc_all(struct mpc_table *mpc, ...@@ -910,10 +915,7 @@ static int __init replace_intsrc_all(struct mpc_table *mpc,
break; break;
default: default:
/* wrong mptable */ /* wrong mptable */
printk(KERN_ERR "Your mptable is wrong, contact your HW vendor!\n"); smp_dump_mptable(mpc, mpt);
printk(KERN_ERR "type %x\n", *mpt);
print_hex_dump(KERN_ERR, " ", DUMP_PREFIX_ADDRESS, 16,
1, mpc, mpc->length, 1);
goto out; goto out;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment