Esempio n. 1
0
int opal_machine_check(struct pt_regs *regs)
{
	struct machine_check_event evt;

	if (!get_mce_event(&evt, MCE_EVENT_RELEASE))
		return 0;

	/* Print things out */
	if (evt.version != MCE_V1) {
		pr_err("Machine Check Exception, Unknown event version %d !\n",
		       evt.version);
		return 0;
	}
	machine_check_print_event_info(&evt);

	if (opal_recover_mce(regs, &evt))
		return 1;
	return 0;
}
Esempio n. 2
0
/*
 * Queue up the MCE event which then can be handled later.
 */
void machine_check_queue_event(void)
{
	int index;
	struct machine_check_event evt;

	if (!get_mce_event(&evt, MCE_EVENT_RELEASE))
		return;

	index = __this_cpu_inc_return(mce_queue_count) - 1;
	/* If queue is full, just return for now. */
	if (index >= MAX_MC_EVT) {
		__this_cpu_dec(mce_queue_count);
		return;
	}
	memcpy(this_cpu_ptr(&mce_event_queue[index]), &evt, sizeof(evt));

	/* Queue irq work to process this event later. */
	irq_work_queue(&mce_event_process_work);
}
Esempio n. 3
0
File: mce.c Progetto: 1800alex/linux
/*
 * Queue up the MCE event which then can be handled later.
 */
void machine_check_queue_event(void)
{
	int index;
	struct machine_check_event evt;

	if (!get_mce_event(&evt, MCE_EVENT_RELEASE))
		return;

	index = __get_cpu_var(mce_queue_count)++;
	/* If queue is full, just return for now. */
	if (index >= MAX_MC_EVT) {
		__get_cpu_var(mce_queue_count)--;
		return;
	}
	__get_cpu_var(mce_event_queue[index]) = evt;

	/* Queue irq work to process this event later. */
	irq_work_queue(&mce_event_process_work);
}
Esempio n. 4
0
void release_mce_event(void)
{
	get_mce_event(NULL, true);
}