Deleted Added
full compact
pmap_dispatch.c (186347) pmap_dispatch.c (190681)
1/*-
2 * Copyright (c) 2005 Peter Grehan
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

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

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 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2005 Peter Grehan
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

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

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 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/powerpc/powerpc/pmap_dispatch.c 186347 2008-12-20 00:33:10Z nwhitehorn $");
29__FBSDID("$FreeBSD: head/sys/powerpc/powerpc/pmap_dispatch.c 190681 2009-04-04 00:22:44Z nwhitehorn $");
30
31/*
32 * Dispatch MI pmap calls to the appropriate MMU implementation
33 * through a previously registered kernel object.
34 *
35 * Before pmap_bootstrap() can be called, a CPU module must have
36 * called pmap_mmu_install(). This may be called multiple times:
37 * the highest priority call will be installed as the default

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

47#include <sys/ktr.h>
48#include <sys/mutex.h>
49#include <sys/systm.h>
50
51#include <vm/vm.h>
52#include <vm/vm_page.h>
53
54#include <machine/mmuvar.h>
30
31/*
32 * Dispatch MI pmap calls to the appropriate MMU implementation
33 * through a previously registered kernel object.
34 *
35 * Before pmap_bootstrap() can be called, a CPU module must have
36 * called pmap_mmu_install(). This may be called multiple times:
37 * the highest priority call will be installed as the default

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

47#include <sys/ktr.h>
48#include <sys/mutex.h>
49#include <sys/systm.h>
50
51#include <vm/vm.h>
52#include <vm/vm_page.h>
53
54#include <machine/mmuvar.h>
55#include <machine/smp.h>
55
56#include "mmu_if.h"
57
58static mmu_def_t *mmu_def_impl;
59static mmu_t mmu_obj;
60static struct mmu_kobj mmu_kernel_obj;
61static struct kobj_ops mmu_kernel_kops;
62

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

401 * then statically initialise the MMU object
402 */
403 kobj_class_compile_static(mmu_def_impl, &mmu_kernel_kops);
404 kobj_init((kobj_t)mmu_obj, mmu_def_impl);
405
406 MMU_BOOTSTRAP(mmu_obj, start, end);
407}
408
56
57#include "mmu_if.h"
58
59static mmu_def_t *mmu_def_impl;
60static mmu_t mmu_obj;
61static struct mmu_kobj mmu_kernel_obj;
62static struct kobj_ops mmu_kernel_kops;
63

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

402 * then statically initialise the MMU object
403 */
404 kobj_class_compile_static(mmu_def_impl, &mmu_kernel_kops);
405 kobj_init((kobj_t)mmu_obj, mmu_def_impl);
406
407 MMU_BOOTSTRAP(mmu_obj, start, end);
408}
409
410void
411pmap_cpu_bootstrap(int ap)
412{
413 /*
414 * No KTR here because our console probably doesn't work yet
415 */
416
417 return (MMU_CPU_BOOTSTRAP(mmu_obj, ap));
418}
419
409void *
410pmap_mapdev(vm_offset_t pa, vm_size_t size)
411{
412
413 CTR3(KTR_PMAP, "%s(%#x, %#x)", __func__, pa, size);
414 return (MMU_MAPDEV(mmu_obj, pa, size));
415}
416

--- 69 unchanged lines hidden ---
420void *
421pmap_mapdev(vm_offset_t pa, vm_size_t size)
422{
423
424 CTR3(KTR_PMAP, "%s(%#x, %#x)", __func__, pa, size);
425 return (MMU_MAPDEV(mmu_obj, pa, size));
426}
427

--- 69 unchanged lines hidden ---