]> git.karo-electronics.de Git - linux-beck.git/commitdiff
microblaze: Put together addik instructions
authorMichal Simek <monstr@monstr.eu>
Tue, 22 Jun 2010 16:16:07 +0000 (18:16 +0200)
committerMichal Simek <monstr@monstr.eu>
Wed, 4 Aug 2010 08:44:56 +0000 (10:44 +0200)
Saving instructions by adding 2/3 addik instructions to one.

Signed-off-by: Michal Simek <monstr@monstr.eu>
arch/microblaze/kernel/entry.S

index 34100a52619473847f50021853daf940976cf14c..e7abf7426c8cbe122e497db9e78b11468cb089b8 100644 (file)
        /* Kernel-mode state save.  */                                  \
        /* Reload kernel stack-ptr. */                                  \
        lwi     r1, r0, TOPHYS(PER_CPU(ENTRY_SP));                      \
-       tophys(r1,r1);                                                  \
-       addik   r1, r1, -STATE_SAVE_SIZE; /* Make room on the stack.  */\
+       /* FIXME: I can add these two lines to one */                   \
+       /* tophys(r1,r1); */                                            \
+       /* addik        r1, r1, -STATE_SAVE_SIZE; */                    \
+       addik   r1, r1, CONFIG_KERNEL_BASE_ADDR - CONFIG_KERNEL_START - STATE_SAVE_SIZE; \
        SAVE_REGS                                                       \
        brid    2f;                                                     \
        swi     r1, r1, PTO+PT_MODE;                                    \
        lwi     r1, r0, TOPHYS(PER_CPU(CURRENT_SAVE)); /* get saved current */\
        tophys(r1,r1);                                                  \
        lwi     r1, r1, TS_THREAD_INFO; /* get the thread info */       \
-       addik   r1, r1, THREAD_SIZE;    /* calculate kernel stack pointer */\
-       tophys(r1,r1);                                                  \
-       addik   r1, r1, -STATE_SAVE_SIZE; /* Make room on the stack.  */\
+       /* MS these three instructions can be added to one */           \
+       /* addik        r1, r1, THREAD_SIZE; */                         \
+       /* tophys(r1,r1); */                                            \
+       /* addik        r1, r1, -STATE_SAVE_SIZE; */                    \
+       addik r1, r1, THREAD_SIZE + CONFIG_KERNEL_BASE_ADDR - CONFIG_KERNEL_START - STATE_SAVE_SIZE; \
        SAVE_REGS                                                       \
        lwi     r11, r0, TOPHYS(PER_CPU(ENTRY_SP));                     \
        swi     r11, r1, PTO+PT_R1; /* Store user SP.  */               \