.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/arch/arm/lib/copypage-xscale.S |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 1995-2005 Russell King |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License version 2 as |
---|
8 | | - * published by the Free Software Foundation. |
---|
9 | 6 | * |
---|
10 | 7 | * This handles the mini data cache, as found on SA11x0 and XScale |
---|
11 | 8 | * processors. When we copy a user page page, we map it in such a way |
---|
.. | .. |
---|
17 | 14 | #include <linux/mm.h> |
---|
18 | 15 | #include <linux/highmem.h> |
---|
19 | 16 | |
---|
20 | | -#include <asm/pgtable.h> |
---|
21 | 17 | #include <asm/tlbflush.h> |
---|
22 | 18 | #include <asm/cacheflush.h> |
---|
23 | 19 | |
---|
.. | .. |
---|
45 | 41 | * when prefetching destination as well. (NP) |
---|
46 | 42 | */ |
---|
47 | 43 | asm volatile ("\ |
---|
| 44 | +.arch xscale \n\ |
---|
48 | 45 | pld [%0, #0] \n\ |
---|
49 | 46 | pld [%0, #32] \n\ |
---|
50 | 47 | pld [%1, #0] \n\ |
---|
.. | .. |
---|
53 | 50 | pld [%0, #96] \n\ |
---|
54 | 51 | pld [%1, #64] \n\ |
---|
55 | 52 | pld [%1, #96] \n\ |
---|
56 | | -2: ldrd r2, [%0], #8 \n\ |
---|
57 | | - ldrd r4, [%0], #8 \n\ |
---|
| 53 | +2: ldrd r2, r3, [%0], #8 \n\ |
---|
| 54 | + ldrd r4, r5, [%0], #8 \n\ |
---|
58 | 55 | mov ip, %1 \n\ |
---|
59 | | - strd r2, [%1], #8 \n\ |
---|
60 | | - ldrd r2, [%0], #8 \n\ |
---|
61 | | - strd r4, [%1], #8 \n\ |
---|
62 | | - ldrd r4, [%0], #8 \n\ |
---|
63 | | - strd r2, [%1], #8 \n\ |
---|
64 | | - strd r4, [%1], #8 \n\ |
---|
| 56 | + strd r2, r3, [%1], #8 \n\ |
---|
| 57 | + ldrd r2, r3, [%0], #8 \n\ |
---|
| 58 | + strd r4, r5, [%1], #8 \n\ |
---|
| 59 | + ldrd r4, r5, [%0], #8 \n\ |
---|
| 60 | + strd r2, r3, [%1], #8 \n\ |
---|
| 61 | + strd r4, r5, [%1], #8 \n\ |
---|
65 | 62 | mcr p15, 0, ip, c7, c10, 1 @ clean D line\n\ |
---|
66 | | - ldrd r2, [%0], #8 \n\ |
---|
| 63 | + ldrd r2, r3, [%0], #8 \n\ |
---|
67 | 64 | mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\ |
---|
68 | | - ldrd r4, [%0], #8 \n\ |
---|
| 65 | + ldrd r4, r5, [%0], #8 \n\ |
---|
69 | 66 | mov ip, %1 \n\ |
---|
70 | | - strd r2, [%1], #8 \n\ |
---|
71 | | - ldrd r2, [%0], #8 \n\ |
---|
72 | | - strd r4, [%1], #8 \n\ |
---|
73 | | - ldrd r4, [%0], #8 \n\ |
---|
74 | | - strd r2, [%1], #8 \n\ |
---|
75 | | - strd r4, [%1], #8 \n\ |
---|
| 67 | + strd r2, r3, [%1], #8 \n\ |
---|
| 68 | + ldrd r2, r3, [%0], #8 \n\ |
---|
| 69 | + strd r4, r5, [%1], #8 \n\ |
---|
| 70 | + ldrd r4, r5, [%0], #8 \n\ |
---|
| 71 | + strd r2, r3, [%1], #8 \n\ |
---|
| 72 | + strd r4, r5, [%1], #8 \n\ |
---|
76 | 73 | mcr p15, 0, ip, c7, c10, 1 @ clean D line\n\ |
---|
77 | 74 | subs %2, %2, #1 \n\ |
---|
78 | 75 | mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\ |
---|
.. | .. |
---|
109 | 106 | xscale_mc_clear_user_highpage(struct page *page, unsigned long vaddr) |
---|
110 | 107 | { |
---|
111 | 108 | void *ptr, *kaddr = kmap_atomic(page); |
---|
112 | | - asm volatile( |
---|
113 | | - "mov r1, %2 \n\ |
---|
| 109 | + asm volatile("\ |
---|
| 110 | +.arch xscale \n\ |
---|
| 111 | + mov r1, %2 \n\ |
---|
114 | 112 | mov r2, #0 \n\ |
---|
115 | 113 | mov r3, #0 \n\ |
---|
116 | 114 | 1: mov ip, %0 \n\ |
---|
117 | | - strd r2, [%0], #8 \n\ |
---|
118 | | - strd r2, [%0], #8 \n\ |
---|
119 | | - strd r2, [%0], #8 \n\ |
---|
120 | | - strd r2, [%0], #8 \n\ |
---|
| 115 | + strd r2, r3, [%0], #8 \n\ |
---|
| 116 | + strd r2, r3, [%0], #8 \n\ |
---|
| 117 | + strd r2, r3, [%0], #8 \n\ |
---|
| 118 | + strd r2, r3, [%0], #8 \n\ |
---|
121 | 119 | mcr p15, 0, ip, c7, c10, 1 @ clean D line\n\ |
---|
122 | 120 | subs r1, r1, #1 \n\ |
---|
123 | 121 | mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\ |
---|