Export the spill page PTE, and provide a hook to initialize it early.

This commit is contained in:
thorpej 1998-06-04 01:22:52 +00:00
parent 6dc28f5445
commit a51d42503c
2 changed files with 16 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: sgmap_typedep.c,v 1.9 1998/03/23 07:51:26 mjacob Exp $ */
/* $NetBSD: sgmap_typedep.c,v 1.10 1998/06/04 01:22:52 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
__KERNEL_RCSID(0, "$NetBSD: sgmap_typedep.c,v 1.9 1998/03/23 07:51:26 mjacob Exp $");
__KERNEL_RCSID(0, "$NetBSD: sgmap_typedep.c,v 1.10 1998/06/04 01:22:52 thorpej Exp $");
#ifdef SGMAP_LOG
@ -59,6 +59,15 @@ int __C(SGMAP_TYPE,_debug) = 0;
SGMAP_PTE_TYPE __C(SGMAP_TYPE,_prefetch_spill_page_pte);
void
__C(SGMAP_TYPE,_init_spill_page_pte)()
{
__C(SGMAP_TYPE,_prefetch_spill_page_pte) =
(alpha_sgmap_prefetch_spill_page_pa >>
SGPTE_PGADDR_SHIFT) | SGPTE_VALID;
}
int
__C(SGMAP_TYPE,_load)(t, map, buf, buflen, p, flags, sgmap)
bus_dma_tag_t t;
@ -83,9 +92,7 @@ __C(SGMAP_TYPE,_load)(t, map, buf, buflen, p, flags, sgmap)
* Initialize the spill page PTE if that hasn't already been done.
*/
if (__C(SGMAP_TYPE,_prefetch_spill_page_pte) == 0)
__C(SGMAP_TYPE,_prefetch_spill_page_pte) =
(alpha_sgmap_prefetch_spill_page_pa >>
SGPTE_PGADDR_SHIFT) | SGPTE_VALID;
__C(SGMAP_TYPE,_init_spill_page_pte)();
/*
* Make sure that on error condition we return "no valid mappings".

View File

@ -1,4 +1,4 @@
/* $NetBSD: sgmap_typedep.h,v 1.3 1998/01/17 21:53:53 thorpej Exp $ */
/* $NetBSD: sgmap_typedep.h,v 1.4 1998/06/04 01:22:52 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -43,6 +43,9 @@
#define __C(A,B) __CONCAT(A,B)
#define __S(S) __STRING(S)
extern SGMAP_PTE_TYPE __C(SGMAP_TYPE,_prefetch_spill_page_pte);
void __C(SGMAP_TYPE,_init_spill_page_pte) __P((void));
int __C(SGMAP_TYPE,_load) __P((bus_dma_tag_t, bus_dmamap_t,
void *, bus_size_t, struct proc *, int, struct alpha_sgmap *));
int __C(SGMAP_TYPE,_load_mbuf) __P((bus_dma_tag_t, bus_dmamap_t,