aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-11 10:19:37 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 01:12:19 -0800
commite92b92571c85dfa1cdc56e88566134c51ae1d12b (patch)
treefdd2bda36e563ea4df9c3f24dc5a3f330d50875c /arch
parent02fd473bd4844befc74f7ca67cd60891e0a2d890 (diff)
downloadlinux-e92b92571c85dfa1cdc56e88566134c51ae1d12b.tar.gz
[SPARC64]: Handle hypervisor case correctly in copy_tsb().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/mm/tsb.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/sparc64/mm/tsb.c b/arch/sparc64/mm/tsb.c
index 6ae2a5a702cb8..c5dc4b0cc1c5c 100644
--- a/arch/sparc64/mm/tsb.c
+++ b/arch/sparc64/mm/tsb.c
@@ -231,7 +231,13 @@ static void copy_tsb(struct tsb *old_tsb, unsigned long old_size,
register unsigned long pte asm("o5");
unsigned long v, hash;
- if (tlb_type == cheetah_plus) {
+ if (tlb_type == hypervisor) {
+ __asm__ __volatile__(
+ "ldda [%2] %3, %0"
+ : "=r" (tag), "=r" (pte)
+ : "r" (__pa(&old_tsb[i])),
+ "i" (ASI_QUAD_LDD_PHYS_4V));
+ } else if (tlb_type == cheetah_plus) {
__asm__ __volatile__(
"ldda [%2] %3, %0"
: "=r" (tag), "=r" (pte)
@@ -267,7 +273,8 @@ static void copy_tsb(struct tsb *old_tsb, unsigned long old_size,
v |= (i & (512UL - 1UL)) << 13UL;
hash = tsb_hash(v, new_nentries);
- if (tlb_type == cheetah_plus) {
+ if (tlb_type == cheetah_plus ||
+ tlb_type == hypervisor) {
__asm__ __volatile__(
"stxa %0, [%1] %2\n\t"
"stxa %3, [%4] %2"