diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-07-10 00:49:09 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-07-10 01:33:14 -0400 |
commit | 74a0ba61b1ca96d6bb98889a7d95cd057165da49 (patch) | |
tree | 1f062fa32459fd564a7331174fe11b2ad151e829 /arch/powerpc/mm | |
parent | cef1a3a5b8697ad76a6d18753e418cfe6a897030 (diff) |
[POWERPC] Move inline asm eieio to using eieio inline function
Use the eieio function so we can redefine what eieio does rather
than direct inline asm. This is part code clean up and partially
because not all PPCs have eieio (book-e has mbar that maps to eieio).
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/hash_native_64.c | 2 | ||||
-rw-r--r-- | arch/powerpc/mm/stab.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c index 823fa63e6485..6ba9b47e55af 100644 --- a/arch/powerpc/mm/hash_native_64.c +++ b/arch/powerpc/mm/hash_native_64.c | |||
@@ -163,7 +163,7 @@ static long native_hpte_insert(unsigned long hpte_group, unsigned long va, | |||
163 | 163 | ||
164 | hptep->r = hpte_r; | 164 | hptep->r = hpte_r; |
165 | /* Guarantee the second dword is visible before the valid bit */ | 165 | /* Guarantee the second dword is visible before the valid bit */ |
166 | __asm__ __volatile__ ("eieio" : : : "memory"); | 166 | eieio(); |
167 | /* | 167 | /* |
168 | * Now set the first dword including the valid bit | 168 | * Now set the first dword including the valid bit |
169 | * NOTE: this also unlocks the hpte | 169 | * NOTE: this also unlocks the hpte |
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c index 132c6bc66ce1..28492bbdee8e 100644 --- a/arch/powerpc/mm/stab.c +++ b/arch/powerpc/mm/stab.c | |||
@@ -55,7 +55,7 @@ static int make_ste(unsigned long stab, unsigned long esid, unsigned long vsid) | |||
55 | for (entry = 0; entry < 8; entry++, ste++) { | 55 | for (entry = 0; entry < 8; entry++, ste++) { |
56 | if (!(ste->esid_data & STE_ESID_V)) { | 56 | if (!(ste->esid_data & STE_ESID_V)) { |
57 | ste->vsid_data = vsid_data; | 57 | ste->vsid_data = vsid_data; |
58 | asm volatile("eieio":::"memory"); | 58 | eieio(); |
59 | ste->esid_data = esid_data; | 59 | ste->esid_data = esid_data; |
60 | return (global_entry | entry); | 60 | return (global_entry | entry); |
61 | } | 61 | } |
@@ -101,7 +101,7 @@ static int make_ste(unsigned long stab, unsigned long esid, unsigned long vsid) | |||
101 | asm volatile("sync" : : : "memory"); /* Order update */ | 101 | asm volatile("sync" : : : "memory"); /* Order update */ |
102 | 102 | ||
103 | castout_ste->vsid_data = vsid_data; | 103 | castout_ste->vsid_data = vsid_data; |
104 | asm volatile("eieio" : : : "memory"); /* Order update */ | 104 | eieio(); /* Order update */ |
105 | castout_ste->esid_data = esid_data; | 105 | castout_ste->esid_data = esid_data; |
106 | 106 | ||
107 | asm volatile("slbie %0" : : "r" (old_esid << SID_SHIFT)); | 107 | asm volatile("slbie %0" : : "r" (old_esid << SID_SHIFT)); |