Blackfin: serial: move early debug strings into .rodata section
authorMike Frysinger <vapier@gentoo.org>
Wed, 29 Jun 2011 20:21:28 +0000 (16:21 -0400)
committerMike Frysinger <vapier@gentoo.org>
Tue, 12 Jul 2011 06:17:46 +0000 (02:17 -0400)
Rewrite the assembly serial_early_puts() helper to place the strings
in the .rodata section rather than embedding them directly in the
.text section.  Using .text is a little simpler, but it doesn't let
people execute out of internal L1 sram (since core reads don't work
on those regions).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/blackfin/cpu/serial.h

index f649e40250fa5ad661b4d87957173088fdc48946..8a076ddc924d7348a1c9062df658eb88c0151a01 100644 (file)
@@ -288,16 +288,16 @@ static inline void serial_early_puts(const char *s)
  */
 #ifdef CONFIG_DEBUG_EARLY_SERIAL
 # define serial_early_puts(str) \
-       call _get_pc; \
-       jump 1f; \
+       .section .rodata; \
+       7: \
        .ascii "Early:"; \
        .ascii __FILE__; \
        .ascii ": "; \
        .ascii str; \
        .asciz "\n"; \
-       .align 4; \
-1: \
-       R0 += 2; \
+       .previous; \
+       R0.L = 7b; \
+       R0.H = 7b; \
        call _serial_puts;
 #else
 # define serial_early_puts(str)