make acorn26 compile by fixing up subpage pool allocations
ok: riz@
This commit is contained in:
parent
01e9003fd7
commit
fa6083dc6c
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: subr_pool.c,v 1.193 2012/01/29 20:20:18 he Exp $ */
|
/* $NetBSD: subr_pool.c,v 1.194 2012/02/04 22:11:42 para Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010
|
* Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.193 2012/01/29 20:20:18 he Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.194 2012/02/04 22:11:42 para Exp $");
|
||||||
|
|
||||||
#include "opt_ddb.h"
|
#include "opt_ddb.h"
|
||||||
#include "opt_pool.h"
|
#include "opt_pool.h"
|
||||||
|
@ -2730,13 +2730,10 @@ struct pool_allocator pool_allocator_kmem = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void *pool_page_alloc_nointr(struct pool *, int);
|
|
||||||
void pool_page_free_nointr(struct pool *, void *);
|
|
||||||
|
|
||||||
#ifdef POOL_SUBPAGE
|
#ifdef POOL_SUBPAGE
|
||||||
struct pool_allocator pool_allocator_nointr_fullpage = {
|
struct pool_allocator pool_allocator_nointr_fullpage = {
|
||||||
.pa_alloc = pool_page_alloc_nointr,
|
.pa_alloc = pool_page_alloc,
|
||||||
.pa_free = pool_page_free_nointr,
|
.pa_free = pool_page_free,
|
||||||
.pa_pagesz = 0
|
.pa_pagesz = 0
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
|
@ -2757,9 +2754,6 @@ struct pool_allocator pool_allocator_kmem = {
|
||||||
.pa_pagesz = POOL_SUBPAGE
|
.pa_pagesz = POOL_SUBPAGE
|
||||||
};
|
};
|
||||||
|
|
||||||
void *pool_subpage_alloc_nointr(struct pool *, int);
|
|
||||||
void pool_subpage_free_nointr(struct pool *, void *);
|
|
||||||
|
|
||||||
struct pool_allocator pool_allocator_nointr = {
|
struct pool_allocator pool_allocator_nointr = {
|
||||||
.pa_alloc = pool_subpage_alloc,
|
.pa_alloc = pool_subpage_alloc,
|
||||||
.pa_free = pool_subpage_free,
|
.pa_free = pool_subpage_free,
|
||||||
|
@ -2850,20 +2844,6 @@ pool_subpage_free(struct pool *pp, void *v)
|
||||||
pool_put(&psppool, v);
|
pool_put(&psppool, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We don't provide a real nointr allocator. Maybe later. */
|
|
||||||
void *
|
|
||||||
pool_subpage_alloc_nointr(struct pool *pp, int flags)
|
|
||||||
{
|
|
||||||
|
|
||||||
return (pool_subpage_alloc(pp, flags));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
pool_subpage_free_nointr(struct pool *pp, void *v)
|
|
||||||
{
|
|
||||||
|
|
||||||
pool_subpage_free(pp, v);
|
|
||||||
}
|
|
||||||
#endif /* POOL_SUBPAGE */
|
#endif /* POOL_SUBPAGE */
|
||||||
|
|
||||||
#if defined(DDB)
|
#if defined(DDB)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: memalloc.c,v 1.11 2010/07/11 11:27:47 pooka Exp $ */
|
/* $NetBSD: memalloc.c,v 1.12 2012/02/04 22:11:43 para Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
|
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: memalloc.c,v 1.11 2010/07/11 11:27:47 pooka Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: memalloc.c,v 1.12 2012/02/04 22:11:43 para Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/kmem.h>
|
#include <sys/kmem.h>
|
||||||
|
@ -322,17 +322,17 @@ pool_prime(struct pool *pp, int nitems)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: for tmpfs, shouldn't be here */
|
/* XXX: for tmpfs, shouldn't be here */
|
||||||
void *pool_page_alloc_nointr(struct pool *, int);
|
void *pool_page_alloc(struct pool *, int);
|
||||||
void pool_page_free_nointr(struct pool *, void *);
|
void pool_page_free(struct pool *, void *);
|
||||||
void *
|
void *
|
||||||
pool_page_alloc_nointr(struct pool *pp, int flags)
|
pool_page_alloc(struct pool *pp, int flags)
|
||||||
{
|
{
|
||||||
|
|
||||||
return pool_get(pp, flags);
|
return pool_get(pp, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
pool_page_free_nointr(struct pool *pp, void *item)
|
pool_page_free(struct pool *pp, void *item)
|
||||||
{
|
{
|
||||||
|
|
||||||
return pool_put(pp, item);
|
return pool_put(pp, item);
|
||||||
|
|
Loading…
Reference in New Issue