提交 1f80a67d 编写于 作者: M Michal Simek

microblaze: Fix pte_update function

Do not disable irq in asm but use irq macros.
Systems with MSR=0 couldn't use pte_update function
because msrclr was hardcoded.
Signed-off-by: NMichal Simek <monstr@monstr.eu>
上级 16497004
...@@ -411,20 +411,19 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) ...@@ -411,20 +411,19 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
static inline unsigned long pte_update(pte_t *p, unsigned long clr, static inline unsigned long pte_update(pte_t *p, unsigned long clr,
unsigned long set) unsigned long set)
{ {
unsigned long old, tmp, msr; unsigned long flags, old, tmp;
__asm__ __volatile__("\ raw_local_irq_save(flags);
msrclr %2, 0x2\n\
nop\n\ __asm__ __volatile__( "lw %0, %2, r0 \n"
lw %0, %4, r0\n\ "andn %1, %0, %3 \n"
andn %1, %0, %5\n\ "or %1, %1, %4 \n"
or %1, %1, %6\n\ "sw %1, %2, r0 \n"
sw %1, %4, r0\n\ : "=&r" (old), "=&r" (tmp)
mts rmsr, %2\n\ : "r" ((unsigned long)(p + 1) - 4), "r" (clr), "r" (set)
nop" : "cc");
: "=&r" (old), "=&r" (tmp), "=&r" (msr), "=m" (*p)
: "r" ((unsigned long)(p + 1) - 4), "r" (clr), "r" (set), "m" (*p) raw_local_irq_restore(flags);
: "cc");
return old; return old;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册