提交 afe8a887 编写于 作者: L Linus Torvalds

Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze

* 'next' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze: Fix ASM optimized code for LE
  microblaze: Fix unaligned issue on MMU system with BS=0 DIV=1
  microblaze: Fix DTB passing from bootloader
...@@ -77,8 +77,18 @@ real_start: ...@@ -77,8 +77,18 @@ real_start:
We ensure r7 points to a valid FDT, just in case the bootloader We ensure r7 points to a valid FDT, just in case the bootloader
is broken or non-existent */ is broken or non-existent */
beqi r7, no_fdt_arg /* NULL pointer? don't copy */ beqi r7, no_fdt_arg /* NULL pointer? don't copy */
lw r11, r0, r7 /* Does r7 point to a */ /* Does r7 point to a valid FDT? Load HEADER magic number */
rsubi r11, r11, OF_DT_HEADER /* valid FDT? */ /* Run time Big/Little endian platform */
/* Save 1 as word and load byte - 0 - BIG, 1 - LITTLE */
addik r11, r0, 0x1 /* BIG/LITTLE checking value */
/* __bss_start will be zeroed later - it is just temp location */
swi r11, r0, TOPHYS(__bss_start)
lbui r11, r0, TOPHYS(__bss_start)
beqid r11, big_endian /* DO NOT break delay stop dependency */
lw r11, r0, r7 /* Big endian load in delay slot */
lwr r11, r0, r7 /* Little endian load */
big_endian:
rsubi r11, r11, OF_DT_HEADER /* Check FDT header */
beqi r11, _prepare_copy_fdt beqi r11, _prepare_copy_fdt
or r7, r0, r0 /* clear R7 when not valid DTB */ or r7, r0, r0 /* clear R7 when not valid DTB */
bnei r11, no_fdt_arg /* No - get out of here */ bnei r11, no_fdt_arg /* No - get out of here */
......
...@@ -147,10 +147,6 @@ ...@@ -147,10 +147,6 @@
#if CONFIG_XILINX_MICROBLAZE0_USE_BARREL > 0 #if CONFIG_XILINX_MICROBLAZE0_USE_BARREL > 0
#define BSRLI(rD, rA, imm) \ #define BSRLI(rD, rA, imm) \
bsrli rD, rA, imm bsrli rD, rA, imm
#elif CONFIG_XILINX_MICROBLAZE0_USE_DIV > 0
#define BSRLI(rD, rA, imm) \
ori rD, r0, (1 << imm); \
idivu rD, rD, rA
#else #else
#define BSRLI(rD, rA, imm) BSRLI ## imm (rD, rA) #define BSRLI(rD, rA, imm) BSRLI ## imm (rD, rA)
/* Only the used shift constants defined here - add more if needed */ /* Only the used shift constants defined here - add more if needed */
......
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
* between mem locations with size of xfer spec'd in bytes * between mem locations with size of xfer spec'd in bytes
*/ */
#ifdef __MICROBLAZEEL__
#error Microblaze LE not support ASM optimized lib func. Disable OPT_LIB_ASM.
#endif
#include <linux/linkage.h> #include <linux/linkage.h>
.text .text
.globl memcpy .globl memcpy
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册