Loading...
1/*
2 * Copyright 2010 Tilera Corporation. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11 * NON INFRINGEMENT. See the GNU General Public License for
12 * more details.
13 */
14
15#ifndef _ASM_TILE_TRAPS_H
16#define _ASM_TILE_TRAPS_H
17
18#include <arch/chip.h>
19
20/* mm/fault.c */
21void do_page_fault(struct pt_regs *, int fault_num,
22 unsigned long address, unsigned long write);
23#if CHIP_HAS_TILE_DMA() || CHIP_HAS_SN_PROC()
24void do_async_page_fault(struct pt_regs *);
25#endif
26
27#ifndef __tilegx__
28/*
29 * We return this structure in registers to avoid having to write
30 * additional save/restore code in the intvec.S caller.
31 */
32struct intvec_state {
33 void *handler;
34 unsigned long vecnum;
35 unsigned long fault_num;
36 unsigned long info;
37 unsigned long retval;
38};
39struct intvec_state do_page_fault_ics(struct pt_regs *regs, int fault_num,
40 unsigned long address,
41 unsigned long info);
42#endif
43
44/* kernel/traps.c */
45void do_trap(struct pt_regs *, int fault_num, unsigned long reason);
46void kernel_double_fault(int dummy, ulong pc, ulong lr, ulong sp, ulong r52);
47
48/* kernel/time.c */
49void do_timer_interrupt(struct pt_regs *, int fault_num);
50
51/* kernel/messaging.c */
52void hv_message_intr(struct pt_regs *, int intnum);
53
54/* kernel/irq.c */
55void tile_dev_intr(struct pt_regs *, int intnum);
56
57#ifdef CONFIG_HARDWALL
58/* kernel/hardwall.c */
59void do_hardwall_trap(struct pt_regs *, int fault_num);
60#endif
61
62/* kernel/ptrace.c */
63void do_breakpoint(struct pt_regs *, int fault_num);
64
65
66#ifdef __tilegx__
67/* kernel/single_step.c */
68void gx_singlestep_handle(struct pt_regs *, int fault_num);
69
70/* kernel/intvec_64.S */
71void fill_ra_stack(void);
72#endif
73
74#endif /* _ASM_TILE_TRAPS_H */
1/*
2 * Copyright 2010 Tilera Corporation. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11 * NON INFRINGEMENT. See the GNU General Public License for
12 * more details.
13 */
14
15#ifndef _ASM_TILE_TRAPS_H
16#define _ASM_TILE_TRAPS_H
17
18#ifndef __ASSEMBLY__
19#include <arch/chip.h>
20
21/* mm/fault.c */
22void do_page_fault(struct pt_regs *, int fault_num,
23 unsigned long address, unsigned long write);
24#if CHIP_HAS_TILE_DMA()
25void do_async_page_fault(struct pt_regs *);
26#endif
27
28#ifndef __tilegx__
29/*
30 * We return this structure in registers to avoid having to write
31 * additional save/restore code in the intvec.S caller.
32 */
33struct intvec_state {
34 void *handler;
35 unsigned long vecnum;
36 unsigned long fault_num;
37 unsigned long info;
38 unsigned long retval;
39};
40struct intvec_state do_page_fault_ics(struct pt_regs *regs, int fault_num,
41 unsigned long address,
42 unsigned long info);
43#endif
44
45/* kernel/traps.c */
46void do_trap(struct pt_regs *, int fault_num, unsigned long reason);
47void kernel_double_fault(int dummy, ulong pc, ulong lr, ulong sp, ulong r52);
48
49/* kernel/time.c */
50void do_timer_interrupt(struct pt_regs *, int fault_num);
51
52/* kernel/messaging.c */
53void hv_message_intr(struct pt_regs *, int intnum);
54
55/* kernel/irq.c */
56void tile_dev_intr(struct pt_regs *, int intnum);
57
58#ifdef CONFIG_HARDWALL
59/* kernel/hardwall.c */
60void do_hardwall_trap(struct pt_regs *, int fault_num);
61#endif
62
63/* kernel/ptrace.c */
64void do_breakpoint(struct pt_regs *, int fault_num);
65
66
67#ifdef __tilegx__
68/* kernel/single_step.c */
69void gx_singlestep_handle(struct pt_regs *, int fault_num);
70
71/* kernel/intvec_64.S */
72void fill_ra_stack(void);
73
74/* Handle unalign data fixup. */
75extern void do_unaligned(struct pt_regs *regs, int vecnum);
76#endif
77
78#endif /* __ASSEMBLY__ */
79
80#ifdef __tilegx__
81/* 128 byte JIT per unalign fixup. */
82#define UNALIGN_JIT_SHIFT 7
83#endif
84
85#endif /* _ASM_TILE_TRAPS_H */