Skip to content

Commit ae3790b

Browse files
wildea01Russell King
authored and
Russell King
committed
ARM: 7502/1: contextidr: avoid using bfi instruction during notifier
The bfi instruction is not available on ARMv6, so instead use an and/orr sequence in the contextidr_notifier. This gets rid of the assembler error: Assembler messages: Error: selected processor does not support ARM mode `bfi r3,r2,#0,#8' Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent dbece45 commit ae3790b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

arch/arm/mm/context.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ static int contextidr_notifier(struct notifier_block *unused, unsigned long cmd,
6363
pid = task_pid_nr(thread->task) << ASID_BITS;
6464
asm volatile(
6565
" mrc p15, 0, %0, c13, c0, 1\n"
66-
" bfi %1, %0, #0, %2\n"
67-
" mcr p15, 0, %1, c13, c0, 1\n"
66+
" and %0, %0, %2\n"
67+
" orr %0, %0, %1\n"
68+
" mcr p15, 0, %0, c13, c0, 1\n"
6869
: "=r" (contextidr), "+r" (pid)
69-
: "I" (ASID_BITS));
70+
: "I" (~ASID_MASK));
7071
isb();
7172

7273
return NOTIFY_OK;

0 commit comments

Comments
 (0)