Skip to content

Commit

Permalink
x86: mpparse.c introduce smp_dump_mptable helper function
Browse files Browse the repository at this point in the history
smp_read_mpc() and replace_intsrc_all() can use same smp_dump_mptable()

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
  • Loading branch information
Jaswinder Singh Rajput committed Mar 21, 2009
1 parent 7f00a24 commit 5a5737e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions arch/x86/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,14 @@ static void skip_entry(unsigned char **ptr, int *count, int 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)
{
char str[16];
Expand Down Expand Up @@ -340,10 +348,7 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
break;
default:
/* wrong mptable */
printk(KERN_ERR "Your mptable is wrong, contact your HW vendor!\n");
printk(KERN_ERR "type %x\n", *mpt);
print_hex_dump(KERN_ERR, " ", DUMP_PREFIX_ADDRESS, 16,
1, mpc, mpc->length, 1);
smp_dump_mptable(mpc, mpt);
count = mpc->length;
break;
}
Expand Down Expand Up @@ -910,10 +915,7 @@ static int __init replace_intsrc_all(struct mpc_table *mpc,
break;
default:
/* wrong mptable */
printk(KERN_ERR "Your mptable is wrong, contact your HW vendor!\n");
printk(KERN_ERR "type %x\n", *mpt);
print_hex_dump(KERN_ERR, " ", DUMP_PREFIX_ADDRESS, 16,
1, mpc, mpc->length, 1);
smp_dump_mptable(mpc, mpt);
goto out;
}
}
Expand Down

0 comments on commit 5a5737e

Please sign in to comment.