diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-02-12 00:57:54 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:12:25 -0500 |
commit | c4bce90ea2069e5a87beac806de3090ab32128d5 (patch) | |
tree | 3983a206c8060ef65ba17945d1c9f69e68d88b3d /arch/sparc64/lib | |
parent | 490384e752a43aa281ed533e9de2da36df25c337 (diff) |
[SPARC64]: Deal with PTE layout differences in SUN4V.
Yes, you heard it right, they changed the PTE layout for
SUN4V. Ho hum...
This is the simple and inefficient way to support this.
It'll get optimized, don't worry.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/lib')
-rw-r--r-- | arch/sparc64/lib/clear_page.S | 8 | ||||
-rw-r--r-- | arch/sparc64/lib/copy_page.S | 7 |
2 files changed, 4 insertions, 11 deletions
diff --git a/arch/sparc64/lib/clear_page.S b/arch/sparc64/lib/clear_page.S index cdc634bceba0..77e531f6c2a7 100644 --- a/arch/sparc64/lib/clear_page.S +++ b/arch/sparc64/lib/clear_page.S | |||
@@ -23,9 +23,6 @@ | |||
23 | * disable preemption during the clear. | 23 | * disable preemption during the clear. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #define TTE_BITS_TOP (_PAGE_VALID | _PAGE_SZBITS) | ||
27 | #define TTE_BITS_BOTTOM (_PAGE_CP | _PAGE_CV | _PAGE_P | _PAGE_L | _PAGE_W) | ||
28 | |||
29 | .text | 26 | .text |
30 | 27 | ||
31 | .globl _clear_page | 28 | .globl _clear_page |
@@ -44,12 +41,11 @@ clear_user_page: /* %o0=dest, %o1=vaddr */ | |||
44 | sethi %hi(PAGE_SIZE), %o4 | 41 | sethi %hi(PAGE_SIZE), %o4 |
45 | 42 | ||
46 | sllx %g2, 32, %g2 | 43 | sllx %g2, 32, %g2 |
47 | sethi %uhi(TTE_BITS_TOP), %g3 | 44 | sethi %hi(PAGE_KERNEL_LOCKED), %g3 |
48 | 45 | ||
49 | sllx %g3, 32, %g3 | 46 | ldx [%g3 + %lo(PAGE_KERNEL_LOCKED)], %g3 |
50 | sub %o0, %g2, %g1 ! paddr | 47 | sub %o0, %g2, %g1 ! paddr |
51 | 48 | ||
52 | or %g3, TTE_BITS_BOTTOM, %g3 | ||
53 | and %o1, %o4, %o0 ! vaddr D-cache alias bit | 49 | and %o1, %o4, %o0 ! vaddr D-cache alias bit |
54 | 50 | ||
55 | or %g1, %g3, %g1 ! TTE data | 51 | or %g1, %g3, %g1 ! TTE data |
diff --git a/arch/sparc64/lib/copy_page.S b/arch/sparc64/lib/copy_page.S index feebb14fd27a..37460666a5c3 100644 --- a/arch/sparc64/lib/copy_page.S +++ b/arch/sparc64/lib/copy_page.S | |||
@@ -23,8 +23,6 @@ | |||
23 | * disable preemption during the clear. | 23 | * disable preemption during the clear. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #define TTE_BITS_TOP (_PAGE_VALID | _PAGE_SZBITS) | ||
27 | #define TTE_BITS_BOTTOM (_PAGE_CP | _PAGE_CV | _PAGE_P | _PAGE_L | _PAGE_W) | ||
28 | #define DCACHE_SIZE (PAGE_SIZE * 2) | 26 | #define DCACHE_SIZE (PAGE_SIZE * 2) |
29 | 27 | ||
30 | #if (PAGE_SHIFT == 13) || (PAGE_SHIFT == 19) | 28 | #if (PAGE_SHIFT == 13) || (PAGE_SHIFT == 19) |
@@ -52,13 +50,12 @@ copy_user_page: /* %o0=dest, %o1=src, %o2=vaddr */ | |||
52 | sethi %hi(PAGE_SIZE), %o3 | 50 | sethi %hi(PAGE_SIZE), %o3 |
53 | 51 | ||
54 | sllx %g2, 32, %g2 | 52 | sllx %g2, 32, %g2 |
55 | sethi %uhi(TTE_BITS_TOP), %g3 | 53 | sethi %hi(PAGE_KERNEL_LOCKED), %g3 |
56 | 54 | ||
57 | sllx %g3, 32, %g3 | 55 | ldx [%g3 + %lo(PAGE_KERNEL_LOCKED)], %g3 |
58 | sub %o0, %g2, %g1 ! dest paddr | 56 | sub %o0, %g2, %g1 ! dest paddr |
59 | 57 | ||
60 | sub %o1, %g2, %g2 ! src paddr | 58 | sub %o1, %g2, %g2 ! src paddr |
61 | or %g3, TTE_BITS_BOTTOM, %g3 | ||
62 | 59 | ||
63 | and %o2, %o3, %o0 ! vaddr D-cache alias bit | 60 | and %o2, %o3, %o0 ! vaddr D-cache alias bit |
64 | or %g1, %g3, %g1 ! dest TTE data | 61 | or %g1, %g3, %g1 ! dest TTE data |