blob: 73fe53e7fd2417f6fdd18f01b32c10c02ce81a9f [file] [log] [blame]
Robin Getz96f10502009-09-24 14:11:24 +00001/*
2 * This file defines the fixed addresses where userspace programs
3 * can find atomic code sequences.
4 *
5 * Copyright 2007-2008 Analog Devices Inc.
6 *
7 * Licensed under the GPL-2 or later.
8 */
Bernd Schmidt7adfb582007-06-21 11:34:16 +08009
Mike Frysinger3c012ee2008-08-14 14:36:15 +080010#ifndef __BFIN_ASM_FIXED_CODE_H__
11#define __BFIN_ASM_FIXED_CODE_H__
12
13#ifdef __KERNEL__
14#ifndef __ASSEMBLY__
15#include <linux/linkage.h>
16#include <linux/ptrace.h>
17extern asmlinkage void finish_atomic_sections(struct pt_regs *regs);
18extern char fixed_code_start;
19extern char fixed_code_end;
20extern int atomic_xchg32(void);
21extern int atomic_cas32(void);
22extern int atomic_add32(void);
23extern int atomic_sub32(void);
24extern int atomic_ior32(void);
25extern int atomic_and32(void);
26extern int atomic_xor32(void);
27extern void safe_user_instruction(void);
28extern void sigreturn_stub(void);
29#endif
30#endif
31
Bernd Schmidt7adfb582007-06-21 11:34:16 +080032#define FIXED_CODE_START 0x400
33
34#define SIGRETURN_STUB 0x400
35
36#define ATOMIC_SEQS_START 0x410
37
38#define ATOMIC_XCHG32 0x410
39#define ATOMIC_CAS32 0x420
40#define ATOMIC_ADD32 0x430
41#define ATOMIC_SUB32 0x440
42#define ATOMIC_IOR32 0x450
43#define ATOMIC_AND32 0x460
44#define ATOMIC_XOR32 0x470
45
46#define ATOMIC_SEQS_END 0x480
47
Robin Getz9f336a52007-10-29 18:23:28 +080048#define SAFE_USER_INSTRUCTION 0x480
49
50#define FIXED_CODE_END 0x490
Mike Frysinger3c012ee2008-08-14 14:36:15 +080051
52#endif