viking.S (498495dba268b20e8eadd7fe93c140c68b6cc9d2) viking.S (8e958839e4b9fb6ea4385ff2c52d1333a3a618de)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * viking.S: High speed Viking cache/mmu operations
4 *
5 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
6 * Copyright (C) 1997,1998,1999 Jakub Jelinek (jj@ultra.linux.cz)
7 * Copyright (C) 1999 Pavel Semerad (semerad@ss1000.ms.mff.cuni.cz)
8 */
9
10#include <asm/ptrace.h>
11#include <asm/psr.h>
12#include <asm/asm-offsets.h>
13#include <asm/asi.h>
14#include <asm/mxcc.h>
15#include <asm/page.h>
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * viking.S: High speed Viking cache/mmu operations
4 *
5 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
6 * Copyright (C) 1997,1998,1999 Jakub Jelinek (jj@ultra.linux.cz)
7 * Copyright (C) 1999 Pavel Semerad (semerad@ss1000.ms.mff.cuni.cz)
8 */
9
10#include <asm/ptrace.h>
11#include <asm/psr.h>
12#include <asm/asm-offsets.h>
13#include <asm/asi.h>
14#include <asm/mxcc.h>
15#include <asm/page.h>
16#include <asm/pgtable.h>
16#include <asm/pgtsrmmu.h>
17#include <asm/viking.h>
18
19#ifdef CONFIG_SMP
20 .data
21 .align 4
22sun4dsmp_flush_tlb_spin:
23 .word 0

--- 128 unchanged lines hidden (view full) ---

152 ld [%o0 + VMA_VM_MM], %o0
153 mov SRMMU_CTX_REG, %g1
154 ld [%o0 + AOFF_mm_context], %o3
155 lda [%g1] ASI_M_MMUREGS, %g5
156#ifndef CONFIG_SMP
157 cmp %o3, -1
158 be 2f
159#endif
17#include <asm/pgtsrmmu.h>
18#include <asm/viking.h>
19
20#ifdef CONFIG_SMP
21 .data
22 .align 4
23sun4dsmp_flush_tlb_spin:
24 .word 0

--- 128 unchanged lines hidden (view full) ---

153 ld [%o0 + VMA_VM_MM], %o0
154 mov SRMMU_CTX_REG, %g1
155 ld [%o0 + AOFF_mm_context], %o3
156 lda [%g1] ASI_M_MMUREGS, %g5
157#ifndef CONFIG_SMP
158 cmp %o3, -1
159 be 2f
160#endif
160 sethi %hi(~((1 << SRMMU_PGDIR_SHIFT) - 1)), %o4
161 sethi %hi(~((1 << PGDIR_SHIFT) - 1)), %o4
161 sta %o3, [%g1] ASI_M_MMUREGS
162 and %o1, %o4, %o1
163 add %o1, 0x200, %o1
164 sta %g0, [%o1] ASI_M_FLUSH_PROBE
1651: sub %o1, %o4, %o1
166 cmp %o1, %o2
167 blu,a 1b
168 sta %g0, [%o1] ASI_M_FLUSH_PROBE

--- 69 unchanged lines hidden (view full) ---

238 sethi %hi(sun4dsmp_flush_tlb_spin), %g3
2391: ldstub [%g3 + %lo(sun4dsmp_flush_tlb_spin)], %g5
240 tst %g5
241 bne 3f
242 mov SRMMU_CTX_REG, %g1
243 ld [%o0 + VMA_VM_MM], %o0
244 ld [%o0 + AOFF_mm_context], %o3
245 lda [%g1] ASI_M_MMUREGS, %g5
162 sta %o3, [%g1] ASI_M_MMUREGS
163 and %o1, %o4, %o1
164 add %o1, 0x200, %o1
165 sta %g0, [%o1] ASI_M_FLUSH_PROBE
1661: sub %o1, %o4, %o1
167 cmp %o1, %o2
168 blu,a 1b
169 sta %g0, [%o1] ASI_M_FLUSH_PROBE

--- 69 unchanged lines hidden (view full) ---

239 sethi %hi(sun4dsmp_flush_tlb_spin), %g3
2401: ldstub [%g3 + %lo(sun4dsmp_flush_tlb_spin)], %g5
241 tst %g5
242 bne 3f
243 mov SRMMU_CTX_REG, %g1
244 ld [%o0 + VMA_VM_MM], %o0
245 ld [%o0 + AOFF_mm_context], %o3
246 lda [%g1] ASI_M_MMUREGS, %g5
246 sethi %hi(~((1 << SRMMU_PGDIR_SHIFT) - 1)), %o4
247 sethi %hi(~((1 << PGDIR_SHIFT) - 1)), %o4
247 sta %o3, [%g1] ASI_M_MMUREGS
248 and %o1, %o4, %o1
249 add %o1, 0x200, %o1
250 sta %g0, [%o1] ASI_M_FLUSH_PROBE
2512: sub %o1, %o4, %o1
252 cmp %o1, %o2
253 blu,a 2b
254 sta %g0, [%o1] ASI_M_FLUSH_PROBE

--- 29 unchanged lines hidden ---
248 sta %o3, [%g1] ASI_M_MMUREGS
249 and %o1, %o4, %o1
250 add %o1, 0x200, %o1
251 sta %g0, [%o1] ASI_M_FLUSH_PROBE
2522: sub %o1, %o4, %o1
253 cmp %o1, %o2
254 blu,a 2b
255 sta %g0, [%o1] ASI_M_FLUSH_PROBE

--- 29 unchanged lines hidden ---