Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: syssrc



Module Name:    syssrc
Committed By:   thorpej
Date:           Tue May 25 23:14:10 UTC 1999

Modified Files:
        syssrc/sys/arch/alpha/common: bus_dma.c
        syssrc/sys/arch/arm32/arm32: bus_dma.c
        syssrc/sys/arch/atari/atari: bus.c
        syssrc/sys/arch/bebox/bebox: bus_dma.c
        syssrc/sys/arch/i386/i386: machdep.c
        syssrc/sys/arch/macppc/macppc: bus_dma.c
        syssrc/sys/arch/next68k/dev: bus_dma.c
        syssrc/sys/arch/pmax/pmax: bus_dma.c
        syssrc/sys/arch/sparc/sparc: iommu.c machdep.c
        syssrc/sys/arch/sparc64/dev: sbus.c
        syssrc/sys/arch/sparc64/sparc64: machdep.c
        syssrc/sys/arch/vax/vax: bus_dma.c
        syssrc/sys/arch/x68k/x68k: bus.c

Log Message:
bus_dmamem_map() maps DMA safe memory, which is usually one or more
managed pages, into KVA space.  Since the pages are managed, we should
use pmap_enter(), not pmap_kenter_pa().

Also, when entering the mappings, enter with an access_type of
VM_PROT_READ | VM_PROT_WRITE.  We do this for a couple of reasons:

        (1) On systems that have H/W mod/ref attributes, the hardware
            may not be able to track mod/ref done by a bus master.

        (2) On systems that have to do mod/ref emulation, this prevents
            a mod/ref page fault from potentially happening while in an
            interrupt context, which can be problematic.

This latter change is fairly important if we ever want to be able to
transfer DMA-safe memory pages to anonymous memory objects; we will need
to know that the pages are modified, or else data could be lost!

Note that while the pages are unowned (i.e. "just DMA-safe memory pages"),
they won't consume any swap resources, as the mappings are wired, and
the pages aren't on the active or inactive queues.


To generate a diff of this commit:
cvs rdiff -r1.29 -r1.30 syssrc/sys/arch/alpha/common/bus_dma.c
cvs rdiff -r1.13 -r1.14 syssrc/sys/arch/arm32/arm32/bus_dma.c
cvs rdiff -r1.13 -r1.14 syssrc/sys/arch/atari/atari/bus.c
cvs rdiff -r1.22 -r1.23 syssrc/sys/arch/bebox/bebox/bus_dma.c
cvs rdiff -r1.354 -r1.355 syssrc/sys/arch/i386/i386/machdep.c
cvs rdiff -r1.8 -r1.9 syssrc/sys/arch/macppc/macppc/bus_dma.c
cvs rdiff -r1.7 -r1.8 syssrc/sys/arch/next68k/dev/bus_dma.c
cvs rdiff -r1.13 -r1.14 syssrc/sys/arch/pmax/pmax/bus_dma.c
cvs rdiff -r1.149 -r1.150 syssrc/sys/arch/sparc/sparc/machdep.c
cvs rdiff -r1.33 -r1.34 syssrc/sys/arch/sparc/sparc/iommu.c
cvs rdiff -r1.13 -r1.14 syssrc/sys/arch/sparc64/dev/sbus.c
cvs rdiff -r1.40 -r1.41 syssrc/sys/arch/sparc64/sparc64/machdep.c
cvs rdiff -r1.1 -r1.2 syssrc/sys/arch/vax/vax/bus_dma.c
cvs rdiff -r1.4 -r1.5 syssrc/sys/arch/x68k/x68k/bus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index