aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/process.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-07 15:00:25 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-07 15:00:25 -0500
commit5bb47b9ff3d16d40f8d45380b373497a545fa280 (patch)
treee13dd34395473342dc75eff5cbaf5b1ea753631c /arch/blackfin/kernel/process.c
parent2f2408a88cf8fa43febfd7fb5783e61b2937b0f9 (diff)
parent06af15e086e39a5a2a2413973a64af8e10122f28 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (171 commits) Blackfin arch: fix bug - BF527 0.2 silicon has different CPUID (DSPID) value Blackfin arch: Enlarge flash partition for kenel for bf533/bf537 boards Blackfin arch: fix bug: kernel crash when enable SDIO host driver Blackfin arch: Print FP at level KERN_NOTICE Blackfin arch: drop ad73311 test code Blackfin arch: update board default configs Blackfin arch: Set PB4 as the default irq for bf548 board v1.4+. Blackfin arch: fix typo in early printk bit size processing Blackfin arch: enable reprogram cclk and sclk for bf518f-ezbrd Blackfin arch: add SDIO host driver platform data Blackfin arch: fix bug - kernel stops at initial console Blackfin arch: fix bug - kernel crash after config IP for ethernet port Blackfin arch: add sdh support for bf518f-ezbrd Blackfin arch: fix bug - kernel detects BF532 incorrectly Blackfin arch: add () to avoid warnings from gcc Blackfin arch: change HWTRACE Kconfig and set it on default Blackfin arch: Clean oprofile build path for blackfin Blackfin arch: remove hardware PM code, oprofile not use it Blackfin arch: rewrite get_sclk()/get_vco() Blackfin arch: cleanup and unify the ins functions ...
Diffstat (limited to 'arch/blackfin/kernel/process.c')
-rw-r--r--arch/blackfin/kernel/process.c32
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
43asmlinkage void ret_from_fork(void); 44asmlinkage void ret_from_fork(void);
44 45
@@ -81,11 +82,14 @@ void cpu_idle(void)__attribute__((l1_text));
81 */ 82 */
82static void default_idle(void) 83static 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, &regs, 0, NULL, 158 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL,
155 NULL); 159 NULL);
156} 160}
161EXPORT_SYMBOL(kernel_thread);
157 162
158void flush_thread(void) 163void 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