drm/modes: Fix drm_mode_vrefres() docs
[drm/drm-misc.git] / arch / sparc / include / asm / head_32.h
blobd2809c859d0c7f6e53b8cbcb15cb56804d726fef
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __SPARC_HEAD_H
3 #define __SPARC_HEAD_H
5 #define KERNBASE 0xf0000000 /* First address the kernel will eventually be */
7 #define WRITE_PAUSE nop; nop; nop; /* Have to do this after %wim/%psr chg */
9 /* Here are some trap goodies */
11 /* Generic trap entry. */
12 #define TRAP_ENTRY(type, label) \
13 rd %psr, %l0; b label; rd %wim, %l3; nop;
15 /* Data/text faults */
16 #define SRMMU_TFAULT rd %psr, %l0; rd %wim, %l3; b srmmu_fault; mov 1, %l7;
17 #define SRMMU_DFAULT rd %psr, %l0; rd %wim, %l3; b srmmu_fault; mov 0, %l7;
19 /* This is for traps we should NEVER get. */
20 #define BAD_TRAP(num) \
21 rd %psr, %l0; mov num, %l7; b bad_trap_handler; rd %wim, %l3;
23 /* This is for traps when we want just skip the instruction which caused it */
24 #define SKIP_TRAP(type, name) \
25 jmpl %l2, %g0; rett %l2 + 4; nop; nop;
27 /* Notice that for the system calls we pull a trick. We load up a
28 * different pointer to the system call vector table in %l7, but call
29 * the same generic system call low-level entry point. The trap table
30 * entry sequences are also HyperSparc pipeline friendly ;-)
33 /* Software trap for Linux system calls. */
34 #define LINUX_SYSCALL_TRAP \
35 sethi %hi(sys_call_table), %l7; \
36 or %l7, %lo(sys_call_table), %l7; \
37 b linux_sparc_syscall; \
38 rd %psr, %l0;
40 #define BREAKPOINT_TRAP \
41 b breakpoint_trap; \
42 rd %psr,%l0; \
43 nop; \
44 nop;
46 #ifdef CONFIG_KGDB
47 #define KGDB_TRAP(num) \
48 mov num, %l7; \
49 b kgdb_trap_low; \
50 rd %psr,%l0; \
51 nop;
52 #else
53 #define KGDB_TRAP(num) \
54 BAD_TRAP(num)
55 #endif
57 /* The Get Condition Codes software trap for userland. */
58 #define GETCC_TRAP \
59 b getcc_trap_handler; rd %psr, %l0; nop; nop;
61 /* The Set Condition Codes software trap for userland. */
62 #define SETCC_TRAP \
63 b setcc_trap_handler; rd %psr, %l0; nop; nop;
65 /* The Get PSR software trap for userland. */
66 #define GETPSR_TRAP \
67 rd %psr, %i0; jmp %l2; rett %l2 + 4; nop;
69 /* This is for hard interrupts from level 1-14, 15 is non-maskable (nmi) and
70 * gets handled with another macro.
72 #define TRAP_ENTRY_INTERRUPT(int_level) \
73 mov int_level, %l7; rd %psr, %l0; b real_irq_entry; rd %wim, %l3;
75 /* Window overflows/underflows are special and we need to try to be as
76 * efficient as possible here....
78 #define WINDOW_SPILL \
79 rd %psr, %l0; rd %wim, %l3; b spill_window_entry; andcc %l0, PSR_PS, %g0;
81 #define WINDOW_FILL \
82 rd %psr, %l0; rd %wim, %l3; b fill_window_entry; andcc %l0, PSR_PS, %g0;
84 #endif /* __SPARC_HEAD_H */