Blackfin arch: smp patch cleanup from LKML review
[safe/jmp/linux-2.6] / arch / blackfin / include / asm / mem_map.h
1 /*
2  * mem_map.h
3  * Common header file for blackfin family of processors.
4  *
5  */
6
7 #ifndef _MEM_MAP_H_
8 #define _MEM_MAP_H_
9
10 #include <mach/mem_map.h>
11
12 #ifndef __ASSEMBLY__
13
14 #ifdef CONFIG_SMP
15 static inline ulong get_l1_scratch_start_cpu(int cpu)
16 {
17         return (cpu) ? COREB_L1_SCRATCH_START : COREA_L1_SCRATCH_START;
18 }
19 static inline ulong get_l1_code_start_cpu(int cpu)
20 {
21         return (cpu) ? COREB_L1_CODE_START : COREA_L1_CODE_START;
22 }
23 static inline ulong get_l1_data_a_start_cpu(int cpu)
24 {
25         return (cpu) ? COREB_L1_DATA_A_START : COREA_L1_DATA_A_START;
26 }
27 static inline ulong get_l1_data_b_start_cpu(int cpu)
28 {
29         return (cpu) ? COREB_L1_DATA_B_START : COREA_L1_DATA_B_START;
30 }
31
32 static inline ulong get_l1_scratch_start(void)
33 {
34         return get_l1_scratch_start_cpu(blackfin_core_id());
35 }
36 static inline ulong get_l1_code_start(void)
37 {
38         return get_l1_code_start_cpu(blackfin_core_id());
39 }
40 static inline ulong get_l1_data_a_start(void)
41 {
42         return get_l1_data_a_start_cpu(blackfin_core_id());
43 }
44 static inline ulong get_l1_data_b_start(void)
45 {
46         return get_l1_data_b_start_cpu(blackfin_core_id());
47 }
48
49 #else /* !CONFIG_SMP */
50
51 static inline ulong get_l1_scratch_start_cpu(int cpu)
52 {
53         return L1_SCRATCH_START;
54 }
55 static inline ulong get_l1_code_start_cpu(int cpu)
56 {
57         return L1_CODE_START;
58 }
59 static inline ulong get_l1_data_a_start_cpu(int cpu)
60 {
61         return L1_DATA_A_START;
62 }
63 static inline ulong get_l1_data_b_start_cpu(int cpu)
64 {
65         return L1_DATA_B_START;
66 }
67 static inline ulong get_l1_scratch_start(void)
68 {
69         return get_l1_scratch_start_cpu(0);
70 }
71 static inline ulong get_l1_code_start(void)
72 {
73         return  get_l1_code_start_cpu(0);
74 }
75 static inline ulong get_l1_data_a_start(void)
76 {
77         return get_l1_data_a_start_cpu(0);
78 }
79 static inline ulong get_l1_data_b_start(void)
80 {
81         return get_l1_data_b_start_cpu(0);
82 }
83
84 #endif /* CONFIG_SMP */
85 #endif /* __ASSEMBLY__ */
86
87 #endif                          /* _MEM_MAP_H_ */