/* Check if the address reported by the CPU is in a format we can parse. It would be possible to add code for most other cases, but all would be somewhat complicated (e.g. segment offset would require an instruction parser). So only support physical addresses upto page granuality for now.  */
static int mce_usable_address(struct mce *m)
/* Check if the address reported by the CPU is in a format we can parse. It would be possible to add code for most other cases, but all would be somewhat complicated (e.g. segment offset would require an instruction parser). So only support physical addresses upto page granuality for now.  */
static int mce_usable_address(struct mce *m)
{
	if (!(m->status & MCI_STATUS_MISCV) || !(m->status & MCI_STATUS_ADDRV))
		return 0;
	if ((m->misc & 0x3f) > PAGE_SHIFT)
		return 0;
	if (((m->misc >> 6) & 7) != MCM_ADDR_PHYS)
		return 0;
	return 1;
}