NFSv4.1/flexfiles: Fix a protocol error in layoutreturn
[linux/fpc-iii.git] / arch / blackfin / include / asm / sections.h
blobfbd4084757259f7d868b35334c98edae83c2a599
1 /*
2 * Copyright 2004-2009 Analog Devices Inc.
4 * Licensed under the GPL-2 or later.
5 */
7 #ifndef _BLACKFIN_SECTIONS_H
8 #define _BLACKFIN_SECTIONS_H
10 /* only used when MTD_UCLINUX */
11 extern unsigned long memory_mtd_start, memory_mtd_end, mtd_size;
13 extern unsigned long _ramstart, _ramend, _rambase;
14 extern unsigned long memory_start, memory_end, physical_mem_end;
17 * The weak markings on the lengths might seem weird, but this is required
18 * in order to make gcc accept the fact that these may actually have a value
19 * of 0 (since they aren't actually addresses, but sizes of sections).
21 extern char _stext_l1[], _etext_l1[], _text_l1_lma[], __weak _text_l1_len[];
22 extern char _sdata_l1[], _edata_l1[], _sbss_l1[], _ebss_l1[],
23 _data_l1_lma[], __weak _data_l1_len[];
24 #ifdef CONFIG_ROMKERNEL
25 extern char _data_lma[], _data_len[], _sinitdata[], _einitdata[], _init_data_lma[], _init_data_len[];
26 #endif
27 extern char _sdata_b_l1[], _edata_b_l1[], _sbss_b_l1[], _ebss_b_l1[],
28 _data_b_l1_lma[], __weak _data_b_l1_len[];
29 extern char _stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[],
30 _sbss_l2[], _ebss_l2[], _l2_lma[], __weak _l2_len[];
32 #include <asm/mem_map.h>
34 /* Blackfin systems have discontinuous memory map and no virtualized memory */
35 static inline int arch_is_kernel_text(unsigned long addr)
37 return
38 (L1_CODE_LENGTH &&
39 addr >= (unsigned long)_stext_l1 &&
40 addr < (unsigned long)_etext_l1)
42 (L2_LENGTH &&
43 addr >= (unsigned long)_stext_l2 &&
44 addr < (unsigned long)_etext_l2);
46 #define arch_is_kernel_text(addr) arch_is_kernel_text(addr)
48 static inline int arch_is_kernel_data(unsigned long addr)
50 return
51 (L1_DATA_A_LENGTH &&
52 addr >= (unsigned long)_sdata_l1 &&
53 addr < (unsigned long)_ebss_l1)
55 (L1_DATA_B_LENGTH &&
56 addr >= (unsigned long)_sdata_b_l1 &&
57 addr < (unsigned long)_ebss_b_l1)
59 (L2_LENGTH &&
60 addr >= (unsigned long)_sdata_l2 &&
61 addr < (unsigned long)_ebss_l2);
63 #define arch_is_kernel_data(addr) arch_is_kernel_data(addr)
65 #include <asm-generic/sections.h>
67 #endif