conn rcv_lock converted to spinlock, struct cor_sock created, kernel_packet skb_clone...
[cor_2_6_31.git] / arch / blackfin / include / asm / flat.h
blob733a178d782d0dd8e77e2c619f7b67d3271d2500
1 /*
2 * include/asm-blackfin/flat.h -- uClinux flat-format executables
4 * Copyright (C) 2003,
6 */
8 #ifndef __BLACKFIN_FLAT_H__
9 #define __BLACKFIN_FLAT_H__
11 #include <asm/unaligned.h>
13 #define flat_argvp_envp_on_stack() 0
14 #define flat_old_ram_flag(flags) (flags)
16 extern unsigned long bfin_get_addr_from_rp (unsigned long *ptr,
17 unsigned long relval,
18 unsigned long flags,
19 unsigned long *persistent);
21 extern void bfin_put_addr_at_rp(unsigned long *ptr, unsigned long addr,
22 unsigned long relval);
24 /* The amount by which a relocation can exceed the program image limits
25 without being regarded as an error. */
27 #define flat_reloc_valid(reloc, size) ((reloc) <= (size))
29 #define flat_get_addr_from_rp(rp, relval, flags, persistent) \
30 bfin_get_addr_from_rp(rp, relval, flags, persistent)
31 #define flat_put_addr_at_rp(rp, val, relval) \
32 bfin_put_addr_at_rp(rp, val, relval)
34 /* Convert a relocation entry into an address. */
35 static inline unsigned long
36 flat_get_relocate_addr (unsigned long relval)
38 return relval & 0x03ffffff; /* Mask out top 6 bits */
41 static inline int flat_set_persistent(unsigned long relval,
42 unsigned long *persistent)
44 int type = (relval >> 26) & 7;
45 if (type == 3) {
46 *persistent = relval << 16;
47 return 1;
49 return 0;
52 static inline int flat_addr_absolute(unsigned long relval)
54 return (relval & (1 << 29)) != 0;
57 #endif /* __BLACKFIN_FLAT_H__ */