Commit 6210d421c20f12ef4e8c9826973478beb104114d
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King: "Just three fixes this time - a fix for a fix for our memset function, fixing the dummy clockevent so that it doesn't interfere with real hardware clockevents, and fixing a build error for Tegra." * 'fixes' of git://git.linaro.org/people/rmk/linux-arm: ARM: 7675/1: amba: tegra-ahb: Fix build error w/ PM_SLEEP w/o PM_RUNTIME ARM: 7674/1: smp: Avoid dummy clockevent being preferred over real hardware clock-event ARM: 7670/1: fix the memset fix
Showing 3 changed files Side-by-side Diff
arch/arm/kernel/smp.c
arch/arm/lib/memset.S
... | ... | @@ -14,31 +14,15 @@ |
14 | 14 | |
15 | 15 | .text |
16 | 16 | .align 5 |
17 | - .word 0 | |
18 | 17 | |
19 | -1: subs r2, r2, #4 @ 1 do we have enough | |
20 | - blt 5f @ 1 bytes to align with? | |
21 | - cmp r3, #2 @ 1 | |
22 | - strltb r1, [ip], #1 @ 1 | |
23 | - strleb r1, [ip], #1 @ 1 | |
24 | - strb r1, [ip], #1 @ 1 | |
25 | - add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3)) | |
26 | -/* | |
27 | - * The pointer is now aligned and the length is adjusted. Try doing the | |
28 | - * memset again. | |
29 | - */ | |
30 | - | |
31 | 18 | ENTRY(memset) |
19 | + ands r3, r0, #3 @ 1 unaligned? | |
20 | + mov ip, r0 @ preserve r0 as return value | |
21 | + bne 6f @ 1 | |
32 | 22 | /* |
33 | - * Preserve the contents of r0 for the return value. | |
34 | - */ | |
35 | - mov ip, r0 | |
36 | - ands r3, ip, #3 @ 1 unaligned? | |
37 | - bne 1b @ 1 | |
38 | -/* | |
39 | 23 | * we know that the pointer in ip is aligned to a word boundary. |
40 | 24 | */ |
41 | - orr r1, r1, r1, lsl #8 | |
25 | +1: orr r1, r1, r1, lsl #8 | |
42 | 26 | orr r1, r1, r1, lsl #16 |
43 | 27 | mov r3, r1 |
44 | 28 | cmp r2, #16 |
... | ... | @@ -127,5 +111,14 @@ |
127 | 111 | tst r2, #1 |
128 | 112 | strneb r1, [ip], #1 |
129 | 113 | mov pc, lr |
114 | + | |
115 | +6: subs r2, r2, #4 @ 1 do we have enough | |
116 | + blt 5b @ 1 bytes to align with? | |
117 | + cmp r3, #2 @ 1 | |
118 | + strltb r1, [ip], #1 @ 1 | |
119 | + strleb r1, [ip], #1 @ 1 | |
120 | + strb r1, [ip], #1 @ 1 | |
121 | + add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3)) | |
122 | + b 1b | |
130 | 123 | ENDPROC(memset) |