Subject: Re: kern/19435, kern/19919 and BUS_DMA_NOCACHE
To: None <kent@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 01/23/2003 22:30:21
In article <20030123034453.3A247B0D2B@gabi-n.hauN.org>
kent@netbsd.org wrote:
> Dhoyashiki-san posted BUS_DMA_NOCACHE patch to solve the problem
> in kern/19919. I revised the patch so that all platforms had
> BUS_DMA_NOCACHE and the bus_dma manpage had the description for
> it.
>
> Comments? I'll commit the following on the weekend If no objections.
bus_dmamem_mmap() should also handle BUS_DMA_NOCACHE or not?
> +.It Dv BUS_DMA_NOCACHE
> +This flag is a
> +.Em hint
> +to machine-dependent code.
> +If possible, map the unchached memory.
It's better to mention in what case BUS_DMA_NOCACHE is required/used.
(i.e. workaround for broken hardware, etc.)
> #define BUS_DMA_READ 0x100 /* mapping is device -> memory only */
> #define BUS_DMA_WRITE 0x200 /* mapping is memory -> device only */
> +#define BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
IMHO, we should not mix #define<space> and #define<tab>
in the same source.
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp