Deleted Added
full compact
tlb.h (91170) tlb.h (91172)
1/*-
2 * Copyright (c) 2001 Jake Burkholder.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2001 Jake Burkholder.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/sparc64/include/tlb.h 91170 2002-02-23 20:59:35Z jake $
26 * $FreeBSD: head/sys/sparc64/include/tlb.h 91172 2002-02-23 21:10:06Z jake $
27 */
28
29#ifndef _MACHINE_TLB_H_
30#define _MACHINE_TLB_H_
31
32#define TLB_SLOT_COUNT 64
33
34#define TLB_SLOT_TSB_KERNEL_MIN 60 /* XXX */

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

182 * user page.
183 */
184 membar(Sync);
185 }
186 intr_restore(pst);
187}
188
189static __inline void
27 */
28
29#ifndef _MACHINE_TLB_H_
30#define _MACHINE_TLB_H_
31
32#define TLB_SLOT_COUNT 64
33
34#define TLB_SLOT_TSB_KERNEL_MIN 60 /* XXX */

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

182 * user page.
183 */
184 membar(Sync);
185 }
186 intr_restore(pst);
187}
188
189static __inline void
190tlb_context_primary_demap(u_int tlb)
190tlb_context_demap(u_int context)
191{
191{
192 if (tlb & TLB_DTLB)
193 tlb_dtlb_context_primary_demap();
194 if (tlb & TLB_ITLB)
195 tlb_itlb_context_primary_demap();
192 tlb_dtlb_context_primary_demap();
193 tlb_itlb_context_primary_demap();
196}
197
198static __inline void
199tlb_itlb_store_slot(vm_offset_t va, u_long ctx, struct tte tte, int slot)
200{
201 u_long pst;
202
203 pst = intr_disable();

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

212{
213 if (tlb & TLB_DTLB)
214 tlb_dtlb_page_demap(ctx, va);
215 if (tlb & TLB_ITLB)
216 tlb_itlb_page_demap(ctx, va);
217}
218
219static __inline void
194}
195
196static __inline void
197tlb_itlb_store_slot(vm_offset_t va, u_long ctx, struct tte tte, int slot)
198{
199 u_long pst;
200
201 pst = intr_disable();

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

210{
211 if (tlb & TLB_DTLB)
212 tlb_dtlb_page_demap(ctx, va);
213 if (tlb & TLB_ITLB)
214 tlb_itlb_page_demap(ctx, va);
215}
216
217static __inline void
218tlb_range_demap(u_int ctx, vm_offset_t start, vm_offset_t end)
219{
220 for (; start < end; start += PAGE_SIZE)
221 tlb_page_demap(TLB_DTLB | TLB_ITLB, ctx, start);
222}
223
224static __inline void
225tlb_tte_demap(struct tte tte, vm_offset_t va)
226{
227 tlb_page_demap(TD_GET_TLB(tte.tte_data), TT_GET_CTX(tte.tte_tag), va);
228}
229
230static __inline void
220tlb_store(u_int tlb, vm_offset_t va, u_long ctx, struct tte tte)
221{
222 if (tlb & TLB_DTLB)
223 tlb_dtlb_store(va, ctx, tte);
224 if (tlb & TLB_ITLB)
225 tlb_itlb_store(va, ctx, tte);
226}
227
228static __inline void
229tlb_store_slot(u_int tlb, vm_offset_t va, u_long ctx, struct tte tte, int slot)
230{
231 if (tlb & TLB_DTLB)
232 tlb_dtlb_store_slot(va, ctx, tte, slot);
233 if (tlb & TLB_ITLB)
234 tlb_itlb_store_slot(va, ctx, tte, slot);
235}
236
237#endif /* !_MACHINE_TLB_H_ */
231tlb_store(u_int tlb, vm_offset_t va, u_long ctx, struct tte tte)
232{
233 if (tlb & TLB_DTLB)
234 tlb_dtlb_store(va, ctx, tte);
235 if (tlb & TLB_ITLB)
236 tlb_itlb_store(va, ctx, tte);
237}
238
239static __inline void
240tlb_store_slot(u_int tlb, vm_offset_t va, u_long ctx, struct tte tte, int slot)
241{
242 if (tlb & TLB_DTLB)
243 tlb_dtlb_store_slot(va, ctx, tte, slot);
244 if (tlb & TLB_ITLB)
245 tlb_itlb_store_slot(va, ctx, tte, slot);
246}
247
248#endif /* !_MACHINE_TLB_H_ */