À̱¤¿ì
1.3. kmemleak ¶
1.4. mmap ¶
static struct cachepolicy cache_policies[] __initdata = {
{ .policy = "uncached", .cr_mask = CR_W|CR_C, .pmd = PMD_SECT_UNCACHED, .pte = 0, }, { .policy = "buffered", .cr_mask = CR_C, .pmd = PMD_SECT_BUFFERED, .pte = PTE_BUFFERABLE, }, { .policy = "writethrough", .cr_mask = 0, .pmd = PMD_SECT_WT, .pte = PTE_CACHEABLE, }, { .policy = "writeback", .cr_mask = 0, .pmd = PMD_SECT_WB, .pte = PTE_BUFFERABLE|PTE_CACHEABLE, }, { .policy = "writealloc", .cr_mask = 0, .pmd = PMD_SECT_WBWA, .pte = PTE_BUFFERABLE|PTE_CACHEABLE, } }; dma_alloc_coherent()¿Í dma_alloc_writecombine() Â÷ÀÌ´Â ³»ºÎÀûÀ¸·Î __dma_alloc()À» È£ÃâÇÒ ¶§ ¸¶Áö¸· ÀÎÀÚÀÎ pgprot_t ŸÀÔÀÇ prot¿¡ ³Ñ±â´Â °ªÀÌ ´Ù¸£´Ù. dma_alloc_coherent()´Â pgprot_noncached() ¸ÅÅ©·Î¸¦ »ç¿ëÇÏ°í, dma_alloc_writecombine()Àº pgprot_writecombine() ¸ÅÅ©·Î¸¦ »ç¿ëÇÑ´Ù.
#define pgprot_noncached(prot) __pgprot(pgprot_val(prot) & ~(L_PTE_CACHEABLE | L_PTE_BUFFERABLE)) #define pgprot_writecombine(prot) __pgprot(pgprot_val(prot) & ~L_PTE_CACHEABLE) Áï, cache¸¦ »ç¿ëÇÏÁö ¾Êµµ·Ï ¼³Á¤ÇÏ´Â °ÍÀº °°Áö¸¸, ³»ºÎÀûÀ¸·Î cache¿Í main memory »çÀÌÀÇ write bufferÀÇ »ç¿ë ¿©ºÎ¸¦ °áÁ¤ÇÏ´Â °ÍÀ¸·Î »ý°¢µÈ´Ù.
dma_mmap_coherent()¿Í dma_mmap_writecombine()µµ °°Àº ¸Æ¶ôÀ¸·Î º¸ÀδÙ.
dma_free_writecombine()Àº ´Ù¸¥ ÇÔ¼öµé°ú´Â ´Ù¸£°Ô dma_free_coherent()·Î ¸ÅÅ©·Î¸¦ »ç¿ëÇØ Á¤ÀǵǾî ÀÖ´Ù.
7.1. PerlÀÇ ¾ÏÈ£ °°Àº ±âº» º¯¼ö ¶
7.2. Pattern ¶
|