aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include/asm/mem_map.h
diff options
context:
space:
mode:
authorGraf Yang <graf.yang@analog.com>2009-01-07 10:14:39 -0500
committerBryan Wu <cooloney@kernel.org>2009-01-07 10:14:39 -0500
commitdbc895f95500a73ebf1ff12fe85f2e2b3790f52f (patch)
tree8b60024a7725c559767295b2b3ef143a39111f8b /arch/blackfin/include/asm/mem_map.h
parentf994607a2e118aedf1116a58ecd16126dbb83d28 (diff)
Blackfin arch: smp patch cleanup from LKML review
1. Use inline get_l1_... functions instead of macro 2. Fix compile issue about smp barrier functions Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/include/asm/mem_map.h')
-rw-r--r--arch/blackfin/include/asm/mem_map.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/mem_map.h b/arch/blackfin/include/asm/mem_map.h
index 88d04a707708..e92b31051bb7 100644
--- a/arch/blackfin/include/asm/mem_map.h
+++ b/arch/blackfin/include/asm/mem_map.h
@@ -9,4 +9,79 @@
9 9
10#include <mach/mem_map.h> 10#include <mach/mem_map.h>
11 11
12#ifndef __ASSEMBLY__
13
14#ifdef CONFIG_SMP
15static inline ulong get_l1_scratch_start_cpu(int cpu)
16{
17 return (cpu) ? COREB_L1_SCRATCH_START : COREA_L1_SCRATCH_START;
18}
19static inline ulong get_l1_code_start_cpu(int cpu)
20{
21 return (cpu) ? COREB_L1_CODE_START : COREA_L1_CODE_START;
22}
23static 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}
27static 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
32static inline ulong get_l1_scratch_start(void)
33{
34 return get_l1_scratch_start_cpu(blackfin_core_id());
35}
36static inline ulong get_l1_code_start(void)
37{
38 return get_l1_code_start_cpu(blackfin_core_id());
39}
40static inline ulong get_l1_data_a_start(void)
41{
42 return get_l1_data_a_start_cpu(blackfin_core_id());
43}
44static 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
51static inline ulong get_l1_scratch_start_cpu(int cpu)
52{
53 return L1_SCRATCH_START;
54}
55static inline ulong get_l1_code_start_cpu(int cpu)
56{
57 return L1_CODE_START;
58}
59static inline ulong get_l1_data_a_start_cpu(int cpu)
60{
61 return L1_DATA_A_START;
62}
63static inline ulong get_l1_data_b_start_cpu(int cpu)
64{
65 return L1_DATA_B_START;
66}
67static inline ulong get_l1_scratch_start(void)
68{
69 return get_l1_scratch_start_cpu(0);
70}
71static inline ulong get_l1_code_start(void)
72{
73 return get_l1_code_start_cpu(0);
74}
75static inline ulong get_l1_data_a_start(void)
76{
77 return get_l1_data_a_start_cpu(0);
78}
79static 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
12#endif /* _MEM_MAP_H_ */ 87#endif /* _MEM_MAP_H_ */