arch/parisc/kernel/entry.S

Source file repositories/reference/linux-study-clean/arch/parisc/kernel/entry.S

File Facts

System
Linux kernel
Corpus path
arch/parisc/kernel/entry.S
Extension
.S
Size
55746 bytes
Lines
2355
Domain
Architecture Layer
Bucket
arch/parisc
Inferred role
Architecture Layer: arch/parisc
Status
atlas-only

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 <asm/asm-offsets.h>

/* we have the following possibilities to act on an interruption:
 *  - handle in assembly and use shadowed registers only
 *  - save registers to kernel stack and handle in assembly or C */


#include <asm/psw.h>
#include <asm/cache.h>		/* for L1_CACHE_SHIFT */
#include <asm/assembly.h>	/* for LDREG/STREG defines */
#include <asm/signal.h>
#include <asm/unistd.h>
#include <asm/ldcw.h>
#include <asm/traps.h>
#include <asm/thread_info.h>
#include <asm/alternative.h>
#include <asm/spinlock_types.h>

#include <linux/linkage.h>
#include <linux/pgtable.h>

#ifdef CONFIG_64BIT
	.level 2.0w
#else
	.level 2.0
#endif

/*
 * We need seven instructions after a TLB insert for it to take effect.
 * The PA8800/PA8900 processors are an exception and need 12 instructions.
 * The RFI changes both IAOQ_Back and IAOQ_Front, so it counts as one.
 */
#ifdef CONFIG_64BIT
#define NUM_PIPELINE_INSNS    12
#else
#define NUM_PIPELINE_INSNS    7
#endif

	/* Insert num nops */
	.macro	insert_nops num
	.rept \num
	nop
	.endr
	.endm

	/* Get aligned page_table_lock address for this mm from cr28/tr4 */
	.macro  get_ptl reg
	mfctl	%cr28,\reg
	.endm

	/* space_to_prot macro creates a prot id from a space id */

#if (SPACEID_SHIFT) == 0
	.macro  space_to_prot spc prot
	depd,z  \spc,62,31,\prot
	.endm
#else
	.macro  space_to_prot spc prot
	extrd,u \spc,(64 - (SPACEID_SHIFT)),32,\prot
	.endm
#endif
	/*
	 * The "get_stack" macros are responsible for determining the
	 * kernel stack value.
	 *
	 *      If sr7 == 0
	 *          Already using a kernel stack, so call the
	 *          get_stack_use_r30 macro to push a pt_regs structure
	 *          on the stack, and store registers there.
	 *      else

Annotation

Implementation Notes