/* Get the address of the instruction at the time of the machine check error.  */
static void mce_get_rip(struct mce *m, struct pt_regs *regs)
/* Get the address of the instruction at the time of the machine check error.  */
static void mce_get_rip(struct mce *m, struct pt_regs *regs)
{
	if (regs && (m->mcgstatus & (MCG_STATUS_RIPV|MCG_STATUS_EIPV))) {
		m->ip = regs->ip;
		m->cs = regs->cs;
	} else {
		m->ip = 0;
		m->cs = 0;
	}
	if (rip_msr)
		m->ip = mce_rdmsrl(rip_msr);
}