~ubuntu-branches/ubuntu/precise/linux-lowlatency/precise

« back to all changes in this revision

Viewing changes to arch/cris/arch-v32/kernel/cache.c

  • Committer: Package Import Robot
  • Author(s): Alessio Igor Bogani
  • Date: 2011-10-26 11:13:05 UTC
  • Revision ID: package-import@ubuntu.com-20111026111305-tz023xykf0i6eosh
Tags: upstream-3.2.0
ImportĀ upstreamĀ versionĀ 3.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <linux/module.h>
 
2
#include <asm/io.h>
 
3
#include <arch/cache.h>
 
4
#include <arch/hwregs/dma.h>
 
5
 
 
6
/* This file is used to workaround a cache bug, Guinness TR 106. */
 
7
 
 
8
inline void flush_dma_descr(struct dma_descr_data *descr, int flush_buf)
 
9
{
 
10
        /* Flush descriptor to make sure we get correct in_eop and after. */
 
11
        asm volatile ("ftagd [%0]" :: "r" (descr));
 
12
        /* Flush buffer pointed out by descriptor. */
 
13
        if (flush_buf)
 
14
                cris_flush_cache_range(phys_to_virt((unsigned)descr->buf),
 
15
                                (unsigned)(descr->after - descr->buf));
 
16
}
 
17
EXPORT_SYMBOL(flush_dma_descr);
 
18
 
 
19
void flush_dma_list(struct dma_descr_data *descr)
 
20
{
 
21
        while (1) {
 
22
                flush_dma_descr(descr, 1);
 
23
                if (descr->eol)
 
24
                        break;
 
25
                descr = phys_to_virt((unsigned)descr->next);
 
26
        }
 
27
}
 
28
EXPORT_SYMBOL(flush_dma_list);
 
29
 
 
30
/* From cacheflush.S */
 
31
EXPORT_SYMBOL(cris_flush_cache);
 
32
/* From cacheflush.S */
 
33
EXPORT_SYMBOL(cris_flush_cache_range);