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 | |
| parent | 28936603be8ab9c8c3e2284d835c3961b4033bfd (diff) | |
| download | rockbox-84f5c5c3e3590cb993f4cf2a7eba5979e3bc825b.zip rockbox-84f5c5c3e3590cb993f4cf2a7eba5979e3bc825b.tar.gz rockbox-84f5c5c3e3590cb993f4cf2a7eba5979e3bc825b.tar.bz2 rockbox-84f5c5c3e3590cb993f4cf2a7eba5979e3bc825b.tar.xz | |
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
| -rw-r--r-- | apps/tagcache.c | 4 | ||||
| -rw-r--r-- | firmware/backlight.c | 2 | ||||
| -rw-r--r-- | firmware/common/dircache.c | 2 | ||||
| -rw-r--r-- | firmware/drivers/ata.c | 2 | ||||
| -rw-r--r-- | firmware/drivers/button.c | 2 | ||||
| -rw-r--r-- | firmware/scroll_engine.c | 2 | ||||
| -rw-r--r-- | firmware/thread.c | 11 | ||||
| -rw-r--r-- | firmware/usb.c | 2 |
8 files changed, 17 insertions, 10 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index 2ed7574..96c04bd 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -88,7 +88,7 @@ #ifndef __PCTOOL__ /* Tag Cache thread. */ -static struct event_queue tagcache_queue NOCACHEBSS_ATTR; +static struct event_queue tagcache_queue; static long tagcache_stack[(DEFAULT_STACK_SIZE + 0x4000)/sizeof(long)]; static const char tagcache_thread_name[] = "tagcache"; #endif @@ -152,7 +152,7 @@ struct tagcache_command_entry { static struct tagcache_command_entry command_queue[TAGCACHE_COMMAND_QUEUE_LENGTH]; static volatile int command_queue_widx = 0; static volatile int command_queue_ridx = 0; -static struct mutex command_queue_mutex NOCACHEBSS_ATTR; +static struct mutex command_queue_mutex; /* Timestamp of the last added event, so we can wait a bit before committing the * whole queue at once. */ static long command_queue_timestamp = 0; diff --git a/firmware/backlight.c b/firmware/backlight.c index cfe87b3..357b446 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c @@ -95,7 +95,7 @@ const signed char backlight_timeout_value[19] = static void backlight_thread(void); static long backlight_stack[DEFAULT_STACK_SIZE/sizeof(long)]; static const char backlight_thread_name[] = "backlight"; -static struct event_queue backlight_queue NOCACHEBSS_ATTR; +static struct event_queue backlight_queue; static int backlight_timer; static int backlight_timeout; diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c index b92d8fe..8e9cffb 100644 --- a/firmware/common/dircache.c +++ b/firmware/common/dircache.c @@ -62,7 +62,7 @@ static unsigned long reserve_used = 0; static unsigned int cache_build_ticks = 0; static char dircache_cur_path[MAX_PATH*2]; -static struct event_queue dircache_queue NOCACHEBSS_ATTR; +static struct event_queue dircache_queue; static long dircache_stack[(DEFAULT_STACK_SIZE + 0x900)/sizeof(long)]; static const char dircache_thread_name[] = "dircache"; diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 2119216..f63b795 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c @@ -83,7 +83,7 @@ static bool lba48 = false; /* set for 48 bit addressing */ #endif static long ata_stack[(DEFAULT_STACK_SIZE*3)/sizeof(long)]; static const char ata_thread_name[] = "ata"; -static struct event_queue ata_queue NOCACHEBSS_ATTR; +static struct event_queue ata_queue; static bool initialized = false; static long last_user_activity = -1; diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index 25c5903..3967dfc 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c @@ -46,7 +46,7 @@ #define MAX_EVENT_AGE HZ #endif -struct event_queue button_queue NOCACHEBSS_ATTR; +struct event_queue button_queue; static long lastbtn; /* Last valid button status */ static long last_read; /* Last button status, for debouncing/filtering */ diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c index 7c66601..599e7f5 100644 --- a/firmware/scroll_engine.c +++ b/firmware/scroll_engine.c @@ -46,7 +46,7 @@ struct scrollinfo lcd_scroll[LCD_SCROLLABLE_LINES]; #ifdef HAVE_REMOTE_LCD struct scrollinfo lcd_remote_scroll[LCD_REMOTE_SCROLLABLE_LINES]; -struct event_queue scroll_queue NOCACHEBSS_ATTR; +struct event_queue scroll_queue; #endif struct scroll_screen_info lcd_scroll_info = diff --git a/firmware/thread.c b/firmware/thread.c index c9ce049..6ba99dd 100644 --- a/firmware/thread.c +++ b/firmware/thread.c @@ -387,6 +387,13 @@ void corelock_unlock(struct corelock *cl) #endif /* CONFIG_CORELOCK == SW_CORELOCK */ +#ifdef CPU_PP502x +/* Some code relies on timing */ +void switch_thread(struct thread_entry *old) ICODE_ATTR; +void core_wake(IF_COP_VOID(unsigned int othercore)) ICODE_ATTR; +void core_idle(void) ICODE_ATTR; +#endif + /*--------------------------------------------------------------------------- * Put core in a power-saving state if waking list wasn't repopulated and if * 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 "ldr r0, [%[w]] \n" /* Check *waking */ "cmp r0, #0 \n" /* != NULL -> exit */ "bne 1f \n" - /* ------ fixed-time sequence ----- */ + /* ------ fixed-time sequence ----- */ /* Can this be relied upon? */ "ldr r0, [%[ms], %[oc], lsl #2] \n" /* Stay-awake requested? */ "mov r1, #0x80000000 \n" "tst r0, #1 \n" @@ -453,7 +460,7 @@ void core_wake(IF_COP_VOID(unsigned int othercore)) "orr r1, r2, #0xc0 \n" "msr cpsr_c, r1 \n" "mov r1, #1 \n" - /* ------ fixed-time sequence ----- */ + /* ------ fixed-time sequence ----- */ /* Can this be relied upon? */ "str r1, [%[ms], %[oc], lsl #2] \n" /* Send stay-awake message */ "nop \n" "nop \n" diff --git a/firmware/usb.c b/firmware/usb.c index f79af98..f4b92f0 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -66,7 +66,7 @@ static int usb_mmc_countdown = 0; static long usb_stack[(DEFAULT_STACK_SIZE + 0x800)/sizeof(long)]; static const char usb_thread_name[] = "usb"; #endif -static struct event_queue usb_queue NOCACHEBSS_ATTR; +static struct event_queue usb_queue; static int last_usb_status; static bool usb_monitor_enabled; |