From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [alsa-devel] [PATCH] 6fire: fix URB transfer buffer for midi output Date: Thu, 08 Aug 2013 09:28:45 +0200 Message-ID: References: <520345CB.3030307@ladisch.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <520345CB.3030307-P6GI/4k7KOmELgA04lAiVw@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Clemens Ladisch Cc: Alan Stern , alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org, Torsten Schenk , linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: alsa-devel@alsa-project.org At Thu, 08 Aug 2013 09:16:27 +0200, Clemens Ladisch wrote: > > Takashi Iwai wrote: > > Alan Stern wrote: > >> A buffer _can_ be in the middle of a kmalloc'ed space, but the CPU must > >> not access any of the fields around it that might occupy the same cache > >> line while the buffer is being used for DMA. > > > > Hrm, but does the kmalloc buffer always guarantee such cache line > > exclusiveness...? I thought a simple one like SLOB doesn't care. > > Documentation/DMA-API-HOWTO.txt says: > | Architectures must ensure that kmalloc'ed buffer is > | DMA-safe. Drivers and subsystems depend on it. If an architecture > | isn't fully DMA-coherent (i.e. hardware doesn't ensure that data in > | the CPU cache is identical to data in main memory), > | ARCH_DMA_MINALIGN must be set so that the memory allocator > | makes sure that kmalloc'ed buffer doesn't share a cache line with > | the others. Ah, good, thanks! Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html