Linux Audio

Check our new training course

Loading...
v3.15
 1/*
 
 2 * Copyright (C) 2000, 2001  Paolo Alberelli
 3 * Copyright (C) 2003  Paul Mundt
 4 * Copyright (C) 2004  Richard Curnow
 5 *
 6 * This file is subject to the terms and conditions of the GNU General Public
 7 * License.  See the file "COPYING" in the main directory of this archive
 8 * for more details.
 9 */
10#ifndef __ASM_SH_TRAPS_64_H
11#define __ASM_SH_TRAPS_64_H
12
13#include <cpu/registers.h>
14
15extern void phys_stext(void);
16
17#define lookup_exception_vector()		\
18({						\
19	unsigned long _vec;			\
20						\
21	__asm__ __volatile__ (			\
22		"getcon " __EXPEVT ", %0\n\t"	\
23		: "=r" (_vec)			\
24	);					\
25						\
26	_vec;					\
27})
28
29static inline void trigger_address_error(void)
30{
31	phys_stext();
32}
33
34#define BUILD_TRAP_HANDLER(name)	\
35asmlinkage void name##_trap_handler(unsigned int vec, struct pt_regs *regs)
36#define TRAP_HANDLER_DECL
37
38#endif /* __ASM_SH_TRAPS_64_H */
v5.4
 1/* SPDX-License-Identifier: GPL-2.0
 2 *
 3 * Copyright (C) 2000, 2001  Paolo Alberelli
 4 * Copyright (C) 2003  Paul Mundt
 5 * Copyright (C) 2004  Richard Curnow
 
 
 
 
 6 */
 7#ifndef __ASM_SH_TRAPS_64_H
 8#define __ASM_SH_TRAPS_64_H
 9
10#include <cpu/registers.h>
11
12extern void phys_stext(void);
13
14#define lookup_exception_vector()		\
15({						\
16	unsigned long _vec;			\
17						\
18	__asm__ __volatile__ (			\
19		"getcon " __EXPEVT ", %0\n\t"	\
20		: "=r" (_vec)			\
21	);					\
22						\
23	_vec;					\
24})
25
26static inline void trigger_address_error(void)
27{
28	phys_stext();
29}
30
31#define BUILD_TRAP_HANDLER(name)	\
32asmlinkage void name##_trap_handler(unsigned int vec, struct pt_regs *regs)
33#define TRAP_HANDLER_DECL
34
35#endif /* __ASM_SH_TRAPS_64_H */