diff options
Diffstat (limited to 'arch/blackfin/kernel/process.c')
-rw-r--r-- | arch/blackfin/kernel/process.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 0c3ea118b657..33e2e8993f7f 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
@@ -39,6 +39,7 @@ | |||
39 | 39 | ||
40 | #include <asm/blackfin.h> | 40 | #include <asm/blackfin.h> |
41 | #include <asm/fixed_code.h> | 41 | #include <asm/fixed_code.h> |
42 | #include <asm/mem_map.h> | ||
42 | 43 | ||
43 | asmlinkage void ret_from_fork(void); | 44 | asmlinkage void ret_from_fork(void); |
44 | 45 | ||
@@ -81,11 +82,14 @@ void cpu_idle(void)__attribute__((l1_text)); | |||
81 | */ | 82 | */ |
82 | static void default_idle(void) | 83 | static void default_idle(void) |
83 | { | 84 | { |
84 | local_irq_disable(); | 85 | #ifdef CONFIG_IPIPE |
86 | ipipe_suspend_domain(); | ||
87 | #endif | ||
88 | local_irq_disable_hw(); | ||
85 | if (!need_resched()) | 89 | if (!need_resched()) |
86 | idle_with_irq_disabled(); | 90 | idle_with_irq_disabled(); |
87 | 91 | ||
88 | local_irq_enable(); | 92 | local_irq_enable_hw(); |
89 | } | 93 | } |
90 | 94 | ||
91 | /* | 95 | /* |
@@ -154,6 +158,7 @@ pid_t kernel_thread(int (*fn) (void *), void *arg, unsigned long flags) | |||
154 | return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, ®s, 0, NULL, | 158 | return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, ®s, 0, NULL, |
155 | NULL); | 159 | NULL); |
156 | } | 160 | } |
161 | EXPORT_SYMBOL(kernel_thread); | ||
157 | 162 | ||
158 | void flush_thread(void) | 163 | void flush_thread(void) |
159 | { | 164 | { |
@@ -170,6 +175,13 @@ asmlinkage int bfin_clone(struct pt_regs *regs) | |||
170 | unsigned long clone_flags; | 175 | unsigned long clone_flags; |
171 | unsigned long newsp; | 176 | unsigned long newsp; |
172 | 177 | ||
178 | #ifdef __ARCH_SYNC_CORE_DCACHE | ||
179 | if (current->rt.nr_cpus_allowed == num_possible_cpus()) { | ||
180 | current->cpus_allowed = cpumask_of_cpu(smp_processor_id()); | ||
181 | current->rt.nr_cpus_allowed = 1; | ||
182 | } | ||
183 | #endif | ||
184 | |||
173 | /* syscall2 puts clone_flags in r0 and usp in r1 */ | 185 | /* syscall2 puts clone_flags in r0 and usp in r1 */ |
174 | clone_flags = regs->r0; | 186 | clone_flags = regs->r0; |
175 | newsp = regs->r1; | 187 | newsp = regs->r1; |
@@ -337,22 +349,22 @@ int _access_ok(unsigned long addr, unsigned long size) | |||
337 | if (addr >= (unsigned long)__init_begin && | 349 | if (addr >= (unsigned long)__init_begin && |
338 | addr + size <= (unsigned long)__init_end) | 350 | addr + size <= (unsigned long)__init_end) |
339 | return 1; | 351 | return 1; |
340 | if (addr >= L1_SCRATCH_START | 352 | if (addr >= get_l1_scratch_start() |
341 | && addr + size <= L1_SCRATCH_START + L1_SCRATCH_LENGTH) | 353 | && addr + size <= get_l1_scratch_start() + L1_SCRATCH_LENGTH) |
342 | return 1; | 354 | return 1; |
343 | #if L1_CODE_LENGTH != 0 | 355 | #if L1_CODE_LENGTH != 0 |
344 | if (addr >= L1_CODE_START + (_etext_l1 - _stext_l1) | 356 | if (addr >= get_l1_code_start() + (_etext_l1 - _stext_l1) |
345 | && addr + size <= L1_CODE_START + L1_CODE_LENGTH) | 357 | && addr + size <= get_l1_code_start() + L1_CODE_LENGTH) |
346 | return 1; | 358 | return 1; |
347 | #endif | 359 | #endif |
348 | #if L1_DATA_A_LENGTH != 0 | 360 | #if L1_DATA_A_LENGTH != 0 |
349 | if (addr >= L1_DATA_A_START + (_ebss_l1 - _sdata_l1) | 361 | if (addr >= get_l1_data_a_start() + (_ebss_l1 - _sdata_l1) |
350 | && addr + size <= L1_DATA_A_START + L1_DATA_A_LENGTH) | 362 | && addr + size <= get_l1_data_a_start() + L1_DATA_A_LENGTH) |
351 | return 1; | 363 | return 1; |
352 | #endif | 364 | #endif |
353 | #if L1_DATA_B_LENGTH != 0 | 365 | #if L1_DATA_B_LENGTH != 0 |
354 | if (addr >= L1_DATA_B_START + (_ebss_b_l1 - _sdata_b_l1) | 366 | if (addr >= get_l1_data_b_start() + (_ebss_b_l1 - _sdata_b_l1) |
355 | && addr + size <= L1_DATA_B_START + L1_DATA_B_LENGTH) | 367 | && addr + size <= get_l1_data_b_start() + L1_DATA_B_LENGTH) |
356 | return 1; | 368 | return 1; |
357 | #endif | 369 | #endif |
358 | #if L2_LENGTH != 0 | 370 | #if L2_LENGTH != 0 |