diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-10-16 22:00:51 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-10-16 22:00:51 +0000 |
commit | 84f5c5c3e3590cb993f4cf2a7eba5979e3bc825b (patch) | |
tree | b082d38196667f747bbcb9325dc65339d61b67b2 /firmware/thread.c | |
parent | 28936603be8ab9c8c3e2284d835c3961b4033bfd (diff) | |
download | rockbox-84f5c5c3e3590cb993f4cf2a7eba5979e3bc825b.tar.gz rockbox-84f5c5c3e3590cb993f4cf2a7eba5979e3bc825b.zip |
Take out some NOCACHEBSS_ATTR's that were accidentally left. Put some threading code in IRAM that should be there on PP502x.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15155 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/thread.c')
-rw-r--r-- | firmware/thread.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/firmware/thread.c b/firmware/thread.c index c9ce049ea1..6ba99dd325 100644 --- a/firmware/thread.c +++ b/firmware/thread.c | |||
@@ -387,6 +387,13 @@ void corelock_unlock(struct corelock *cl) | |||
387 | 387 | ||
388 | #endif /* CONFIG_CORELOCK == SW_CORELOCK */ | 388 | #endif /* CONFIG_CORELOCK == SW_CORELOCK */ |
389 | 389 | ||
390 | #ifdef CPU_PP502x | ||
391 | /* Some code relies on timing */ | ||
392 | void switch_thread(struct thread_entry *old) ICODE_ATTR; | ||
393 | void core_wake(IF_COP_VOID(unsigned int othercore)) ICODE_ATTR; | ||
394 | void core_idle(void) ICODE_ATTR; | ||
395 | #endif | ||
396 | |||
390 | /*--------------------------------------------------------------------------- | 397 | /*--------------------------------------------------------------------------- |
391 | * Put core in a power-saving state if waking list wasn't repopulated and if | 398 | * Put core in a power-saving state if waking list wasn't repopulated and if |
392 | * no other core requested a wakeup for it to perform a task. | 399 | * no other core requested a wakeup for it to perform a task. |
@@ -405,7 +412,7 @@ static inline void core_sleep(IF_COP(unsigned int core,) struct thread_entry **w | |||
405 | "ldr r0, [%[w]] \n" /* Check *waking */ | 412 | "ldr r0, [%[w]] \n" /* Check *waking */ |
406 | "cmp r0, #0 \n" /* != NULL -> exit */ | 413 | "cmp r0, #0 \n" /* != NULL -> exit */ |
407 | "bne 1f \n" | 414 | "bne 1f \n" |
408 | /* ------ fixed-time sequence ----- */ | 415 | /* ------ fixed-time sequence ----- */ /* Can this be relied upon? */ |
409 | "ldr r0, [%[ms], %[oc], lsl #2] \n" /* Stay-awake requested? */ | 416 | "ldr r0, [%[ms], %[oc], lsl #2] \n" /* Stay-awake requested? */ |
410 | "mov r1, #0x80000000 \n" | 417 | "mov r1, #0x80000000 \n" |
411 | "tst r0, #1 \n" | 418 | "tst r0, #1 \n" |
@@ -453,7 +460,7 @@ void core_wake(IF_COP_VOID(unsigned int othercore)) | |||
453 | "orr r1, r2, #0xc0 \n" | 460 | "orr r1, r2, #0xc0 \n" |
454 | "msr cpsr_c, r1 \n" | 461 | "msr cpsr_c, r1 \n" |
455 | "mov r1, #1 \n" | 462 | "mov r1, #1 \n" |
456 | /* ------ fixed-time sequence ----- */ | 463 | /* ------ fixed-time sequence ----- */ /* Can this be relied upon? */ |
457 | "str r1, [%[ms], %[oc], lsl #2] \n" /* Send stay-awake message */ | 464 | "str r1, [%[ms], %[oc], lsl #2] \n" /* Send stay-awake message */ |
458 | "nop \n" | 465 | "nop \n" |
459 | "nop \n" | 466 | "nop \n" |