diff options
author | Kristoffer Glembo <kristoffer@gaisler.com> | 2009-11-15 18:51:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-16 05:54:09 -0500 |
commit | 4309e5682dd6cca22f1a5cc364b209bf4a121786 (patch) | |
tree | 44a760b9ae5a98fa67a329202b6f9c6e0e11ab09 /arch/sparc/include/asm/leon.h | |
parent | c000c71272ddbe3774b624fdef4eae3147877133 (diff) |
Added sparc_leon3_snooping_enabled() and converted extern inline to static inline
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/leon.h')
-rw-r--r-- | arch/sparc/include/asm/leon.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/sparc/include/asm/leon.h b/arch/sparc/include/asm/leon.h index 559448c2c434..3ea5964c43b4 100644 --- a/arch/sparc/include/asm/leon.h +++ b/arch/sparc/include/asm/leon.h | |||
@@ -148,7 +148,7 @@ static inline unsigned long leon_load_reg(unsigned long paddr) | |||
148 | return retval; | 148 | return retval; |
149 | } | 149 | } |
150 | 150 | ||
151 | extern inline void leon_srmmu_disabletlb(void) | 151 | static inline void leon_srmmu_disabletlb(void) |
152 | { | 152 | { |
153 | unsigned int retval; | 153 | unsigned int retval; |
154 | __asm__ __volatile__("lda [%%g0] %2, %0\n\t" : "=r"(retval) : "r"(0), | 154 | __asm__ __volatile__("lda [%%g0] %2, %0\n\t" : "=r"(retval) : "r"(0), |
@@ -158,7 +158,7 @@ extern inline void leon_srmmu_disabletlb(void) | |||
158 | "i"(ASI_LEON_MMUREGS) : "memory"); | 158 | "i"(ASI_LEON_MMUREGS) : "memory"); |
159 | } | 159 | } |
160 | 160 | ||
161 | extern inline void leon_srmmu_enabletlb(void) | 161 | static inline void leon_srmmu_enabletlb(void) |
162 | { | 162 | { |
163 | unsigned int retval; | 163 | unsigned int retval; |
164 | __asm__ __volatile__("lda [%%g0] %2, %0\n\t" : "=r"(retval) : "r"(0), | 164 | __asm__ __volatile__("lda [%%g0] %2, %0\n\t" : "=r"(retval) : "r"(0), |
@@ -190,7 +190,7 @@ extern void leon_init_IRQ(void); | |||
190 | 190 | ||
191 | extern unsigned long last_valid_pfn; | 191 | extern unsigned long last_valid_pfn; |
192 | 192 | ||
193 | extern inline unsigned long sparc_leon3_get_dcachecfg(void) | 193 | static inline unsigned long sparc_leon3_get_dcachecfg(void) |
194 | { | 194 | { |
195 | unsigned int retval; | 195 | unsigned int retval; |
196 | __asm__ __volatile__("lda [%1] %2, %0\n\t" : | 196 | __asm__ __volatile__("lda [%1] %2, %0\n\t" : |
@@ -201,7 +201,7 @@ extern inline unsigned long sparc_leon3_get_dcachecfg(void) | |||
201 | } | 201 | } |
202 | 202 | ||
203 | /* enable snooping */ | 203 | /* enable snooping */ |
204 | extern inline void sparc_leon3_enable_snooping(void) | 204 | static inline void sparc_leon3_enable_snooping(void) |
205 | { | 205 | { |
206 | __asm__ __volatile__ ("lda [%%g0] 2, %%l1\n\t" | 206 | __asm__ __volatile__ ("lda [%%g0] 2, %%l1\n\t" |
207 | "set 0x800000, %%l2\n\t" | 207 | "set 0x800000, %%l2\n\t" |
@@ -209,7 +209,14 @@ extern inline void sparc_leon3_enable_snooping(void) | |||
209 | "sta %%l2, [%%g0] 2\n\t" : : : "l1", "l2"); | 209 | "sta %%l2, [%%g0] 2\n\t" : : : "l1", "l2"); |
210 | }; | 210 | }; |
211 | 211 | ||
212 | extern inline void sparc_leon3_disable_cache(void) | 212 | static inline int sparc_leon3_snooping_enabled(void) |
213 | { | ||
214 | u32 cctrl; | ||
215 | __asm__ __volatile__("lda [%%g0] 2, %0\n\t" : "=r"(cctrl)); | ||
216 | return (cctrl >> 23) & 1; | ||
217 | }; | ||
218 | |||
219 | static inline void sparc_leon3_disable_cache(void) | ||
213 | { | 220 | { |
214 | __asm__ __volatile__ ("lda [%%g0] 2, %%l1\n\t" | 221 | __asm__ __volatile__ ("lda [%%g0] 2, %%l1\n\t" |
215 | "set 0x00000f, %%l2\n\t" | 222 | "set 0x00000f, %%l2\n\t" |