diff options
author | Marius Strobl <marius@FreeBSD.org> | 2007-05-20 13:06:45 +0000 |
---|---|---|
committer | Marius Strobl <marius@FreeBSD.org> | 2007-05-20 13:06:45 +0000 |
commit | ebf9df01581e9e1c78895e06b71815ca98dc017e (patch) | |
tree | 690d887b782f7b12b5b2fc1007cf34bacaff4ed5 /sys/sparc64 | |
parent | 331a66091a6cb6a8d4a2c2e0969ec004796d21b6 (diff) | |
download | src-ebf9df01581e9e1c78895e06b71815ca98dc017e.tar.gz src-ebf9df01581e9e1c78895e06b71815ca98dc017e.zip |
Delete the unused/not really used sparc64 (as in sun4u) cache.h,
iommureg.h (which already began to bitrot) and iommuvar.h from the
sun4v source and adjust some of the source which is shared between
sparc64 and sun4v as appropriate.
Notes
Notes:
svn path=/head/; revision=169793
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/pci/ofw_pcibus.c | 4 | ||||
-rw-r--r-- | sys/sparc64/sparc64/mem.c | 25 |
2 files changed, 18 insertions, 11 deletions
diff --git a/sys/sparc64/pci/ofw_pcibus.c b/sys/sparc64/pci/ofw_pcibus.c index d5293e1ed38d..8858373c9ab2 100644 --- a/sys/sparc64/pci/ofw_pcibus.c +++ b/sys/sparc64/pci/ofw_pcibus.c @@ -48,8 +48,8 @@ __FBSDID("$FreeBSD$"); #include <machine/bus_common.h> #ifndef SUN4V #include <machine/cache.h> -#endif #include <machine/iommureg.h> +#endif #include <machine/resource.h> #include <dev/pci/pcireg.h> @@ -162,8 +162,8 @@ ofw_pcibus_setup_device(device_t bridge, u_int busno, u_int slot, u_int func) (clnsz / 4) * 4 == clnsz, ("bogus cache line size %d", clnsz)); PCIB_WRITE_CONFIG(bridge, busno, slot, func, PCIR_CACHELNSZ, clnsz / 4, 1); - #endif + /* * The preset in the intline register is usually wrong. Reset it to 255, * so that the PCI code will reroute the interrupt if needed. diff --git a/sys/sparc64/sparc64/mem.c b/sys/sparc64/sparc64/mem.c index 459191ad9cae..e8c58e2606fc 100644 --- a/sys/sparc64/sparc64/mem.c +++ b/sys/sparc64/sparc64/mem.c @@ -70,7 +70,9 @@ __FBSDID("$FreeBSD$"); #include <vm/pmap.h> #include <vm/vm_extern.h> +#ifndef SUN4V #include <machine/cache.h> +#endif #include <machine/md_var.h> #include <machine/pmap.h> #include <machine/tlb.h> @@ -94,9 +96,6 @@ memrw(struct cdev *dev, struct uio *uio, int flags) vm_page_t m; int error; int i; -#ifndef SUN4V - int color; -#endif cnt = 0; error = 0; @@ -136,16 +135,20 @@ memrw(struct cdev *dev, struct uio *uio, int flags) } if (m != NULL) { - if (ova == 0) { +#ifndef SUN4V + if (ova == 0) ova = kmem_alloc_wait(kernel_map, PAGE_SIZE * DCACHE_COLORS); - } -#ifndef SUN4V - if ((color = m->md.color) != -1) - va = ova + color * PAGE_SIZE; + if (m->md.color != -1) + va = ova + m->md.color * PAGE_SIZE; else -#endif va = ova; +#else + if (ova == 0) + ova = kmem_alloc_wait(kernel_map, + PAGE_SIZE); + va = ova; +#endif pmap_qenter(va, &m, 1); error = uiomove((void *)(va + off), cnt, uio); @@ -182,7 +185,11 @@ memrw(struct cdev *dev, struct uio *uio, int flags) /* else panic! */ } if (ova != 0) +#ifndef SUN4V kmem_free_wakeup(kernel_map, ova, PAGE_SIZE * DCACHE_COLORS); +#else + kmem_free_wakeup(kernel_map, ova, PAGE_SIZE); +#endif return (error); } |