summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-10-16 22:00:51 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-10-16 22:00:51 +0000
commit84f5c5c3e3590cb993f4cf2a7eba5979e3bc825b (patch)
treeb082d38196667f747bbcb9325dc65339d61b67b2
parent28936603be8ab9c8c3e2284d835c3961b4033bfd (diff)
downloadrockbox-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
-rw-r--r--apps/tagcache.c4
-rw-r--r--firmware/backlight.c2
-rw-r--r--firmware/common/dircache.c2
-rw-r--r--firmware/drivers/ata.c2
-rw-r--r--firmware/drivers/button.c2
-rw-r--r--firmware/scroll_engine.c2
-rw-r--r--firmware/thread.c11
-rw-r--r--firmware/usb.c2
8 files changed, 17 insertions, 10 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 2ed7574f3b..96c04bde89 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -88,7 +88,7 @@
88 88
89#ifndef __PCTOOL__ 89#ifndef __PCTOOL__
90/* Tag Cache thread. */ 90/* Tag Cache thread. */
91static struct event_queue tagcache_queue NOCACHEBSS_ATTR; 91static struct event_queue tagcache_queue;
92static long tagcache_stack[(DEFAULT_STACK_SIZE + 0x4000)/sizeof(long)]; 92static long tagcache_stack[(DEFAULT_STACK_SIZE + 0x4000)/sizeof(long)];
93static const char tagcache_thread_name[] = "tagcache"; 93static const char tagcache_thread_name[] = "tagcache";
94#endif 94#endif
@@ -152,7 +152,7 @@ struct tagcache_command_entry {
152static struct tagcache_command_entry command_queue[TAGCACHE_COMMAND_QUEUE_LENGTH]; 152static struct tagcache_command_entry command_queue[TAGCACHE_COMMAND_QUEUE_LENGTH];
153static volatile int command_queue_widx = 0; 153static volatile int command_queue_widx = 0;
154static volatile int command_queue_ridx = 0; 154static volatile int command_queue_ridx = 0;
155static struct mutex command_queue_mutex NOCACHEBSS_ATTR; 155static struct mutex command_queue_mutex;
156/* Timestamp of the last added event, so we can wait a bit before committing the 156/* Timestamp of the last added event, so we can wait a bit before committing the
157 * whole queue at once. */ 157 * whole queue at once. */
158static long command_queue_timestamp = 0; 158static long command_queue_timestamp = 0;
diff --git a/firmware/backlight.c b/firmware/backlight.c
index cfe87b387e..357b446a23 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -95,7 +95,7 @@ const signed char backlight_timeout_value[19] =
95static void backlight_thread(void); 95static void backlight_thread(void);
96static long backlight_stack[DEFAULT_STACK_SIZE/sizeof(long)]; 96static long backlight_stack[DEFAULT_STACK_SIZE/sizeof(long)];
97static const char backlight_thread_name[] = "backlight"; 97static const char backlight_thread_name[] = "backlight";
98static struct event_queue backlight_queue NOCACHEBSS_ATTR; 98static struct event_queue backlight_queue;
99 99
100static int backlight_timer; 100static int backlight_timer;
101static int backlight_timeout; 101static int backlight_timeout;
diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c
index b92d8fe974..8e9cffb73e 100644
--- a/firmware/common/dircache.c
+++ b/firmware/common/dircache.c
@@ -62,7 +62,7 @@ static unsigned long reserve_used = 0;
62static unsigned int cache_build_ticks = 0; 62static unsigned int cache_build_ticks = 0;
63static char dircache_cur_path[MAX_PATH*2]; 63static char dircache_cur_path[MAX_PATH*2];
64 64
65static struct event_queue dircache_queue NOCACHEBSS_ATTR; 65static struct event_queue dircache_queue;
66static long dircache_stack[(DEFAULT_STACK_SIZE + 0x900)/sizeof(long)]; 66static long dircache_stack[(DEFAULT_STACK_SIZE + 0x900)/sizeof(long)];
67static const char dircache_thread_name[] = "dircache"; 67static const char dircache_thread_name[] = "dircache";
68 68
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 2119216234..f63b795a19 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -83,7 +83,7 @@ static bool lba48 = false; /* set for 48 bit addressing */
83#endif 83#endif
84static long ata_stack[(DEFAULT_STACK_SIZE*3)/sizeof(long)]; 84static long ata_stack[(DEFAULT_STACK_SIZE*3)/sizeof(long)];
85static const char ata_thread_name[] = "ata"; 85static const char ata_thread_name[] = "ata";
86static struct event_queue ata_queue NOCACHEBSS_ATTR; 86static struct event_queue ata_queue;
87static bool initialized = false; 87static bool initialized = false;
88 88
89static long last_user_activity = -1; 89static long last_user_activity = -1;
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index 25c590323a..3967dfcc1a 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -46,7 +46,7 @@
46#define MAX_EVENT_AGE HZ 46#define MAX_EVENT_AGE HZ
47#endif 47#endif
48 48
49struct event_queue button_queue NOCACHEBSS_ATTR; 49struct event_queue button_queue;
50 50
51static long lastbtn; /* Last valid button status */ 51static long lastbtn; /* Last valid button status */
52static long last_read; /* Last button status, for debouncing/filtering */ 52static long last_read; /* Last button status, for debouncing/filtering */
diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c
index 7c66601d6a..599e7f58b5 100644
--- a/firmware/scroll_engine.c
+++ b/firmware/scroll_engine.c
@@ -46,7 +46,7 @@ struct scrollinfo lcd_scroll[LCD_SCROLLABLE_LINES];
46 46
47#ifdef HAVE_REMOTE_LCD 47#ifdef HAVE_REMOTE_LCD
48struct scrollinfo lcd_remote_scroll[LCD_REMOTE_SCROLLABLE_LINES]; 48struct scrollinfo lcd_remote_scroll[LCD_REMOTE_SCROLLABLE_LINES];
49struct event_queue scroll_queue NOCACHEBSS_ATTR; 49struct event_queue scroll_queue;
50#endif 50#endif
51 51
52struct scroll_screen_info lcd_scroll_info = 52struct scroll_screen_info lcd_scroll_info =
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 */
392void switch_thread(struct thread_entry *old) ICODE_ATTR;
393void core_wake(IF_COP_VOID(unsigned int othercore)) ICODE_ATTR;
394void 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"
diff --git a/firmware/usb.c b/firmware/usb.c
index f79af98518..f4b92f07d0 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -66,7 +66,7 @@ static int usb_mmc_countdown = 0;
66static long usb_stack[(DEFAULT_STACK_SIZE + 0x800)/sizeof(long)]; 66static long usb_stack[(DEFAULT_STACK_SIZE + 0x800)/sizeof(long)];
67static const char usb_thread_name[] = "usb"; 67static const char usb_thread_name[] = "usb";
68#endif 68#endif
69static struct event_queue usb_queue NOCACHEBSS_ATTR; 69static struct event_queue usb_queue;
70static int last_usb_status; 70static int last_usb_status;
71static bool usb_monitor_enabled; 71static bool usb_monitor_enabled;
72 72