arch/mips/sgi-ip32/ip32-berr.c

Source file repositories/reference/linux-study-clean/arch/mips/sgi-ip32/ip32-berr.c

File Facts

System
Linux kernel
Corpus path
arch/mips/sgi-ip32/ip32-berr.c
Extension
.c
Size
973 bytes
Lines
41
Domain
Architecture Layer
Bucket
arch/mips
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/sched/debug.h>
#include <linux/sched/signal.h>
#include <asm/traps.h>
#include <linux/uaccess.h>
#include <asm/addrspace.h>
#include <asm/ptrace.h>
#include <asm/tlbdebug.h>

#include "ip32-common.h"

static int ip32_be_handler(struct pt_regs *regs, int is_fixup)
{
	int data = regs->cp0_cause & 4;

	if (is_fixup)
		return MIPS_BE_FIXUP;

	printk("Got %cbe at 0x%lx\n", data ? 'd' : 'i', regs->cp0_epc);
	show_regs(regs);
	dump_tlb_all();
	while(1);
	force_sig(SIGBUS);
}

void __init ip32_be_init(void)
{
	mips_set_be_handler(ip32_be_handler);
}

Annotation

Implementation Notes