Re: [microblaze-uclinux] [PATCH 09/56] microblaze_v2: cache support

From: Michal Simek
Date: Tue May 06 2008 - 05:29:29 EST


Hi Steve,

> The microblaze has a write through data cache, hence 'flush' is really a
> misnomer here and interesting methods are 'invalidate'. In addition,
> most of these functions should be used directly by an implementation of
> dma-coherent.c (which I can't find in your patches).

I removed consistent.c or dma-coherent.c from files. I don't need this code for
now. Microblaze is currently no DMA arch.
I know we need this to ll_temac work but not now. I added this to my plan after
first pull.

M

> I'll try to cook up a patch for you with this today.
>
> Steve
>
>> +#define flush_cache_all() __flush_cache_all()
>> +#define flush_cache_mm(mm) do { } while (0)
>> +#define flush_cache_range(vma, start, end) __flush_cache_all()
>> +#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
>> +
>> +#define flush_dcache_range(start, end)
> __flush_dcache_range(start, end)
>> +#define flush_dcache_page(page) do { } while (0)
>> +#define flush_dcache_mmap_lock(mapping) do { } while (0)
>> +#define flush_dcache_mmap_unlock(mapping) do { } while (0)
>> +
>> +#define flush_icache_range(start, len)
> __flush_icache_range(start, len)
>> +#define flush_icache_page(vma, pg) do { } while (0)
>> +#define flush_icache_user_range(start, len) do { } while (0)
>> +
>> +#define flush_cache_vmap(start, end) do { } while (0)
>> +#define flush_cache_vunmap(start, end) do { } while (0)
>> +
>> +struct page;
>> +struct mm_struct;
>> +struct vm_area_struct;
>> +
>> +/* see arch/microblaze/kernel/cache.c */
>> +extern void __flush_icache_all(void);
>> +extern void __flush_icache_range(unsigned long start, unsigned long
> end);
>> +extern void __flush_icache_page(struct vm_area_struct *vma, struct
> page *page);
>> +extern void __flush_icache_user_range(struct vm_area_struct *vma,
>> + struct page *page,
>> + unsigned long adr, int len);
>> +extern void __flush_cache_sigtramp(unsigned long addr);
>> +
>> +extern void __flush_dcache_all(void);
>> +extern void __flush_dcache_range(unsigned long start, unsigned long
> end);
>> +extern void __flush_dcache_page(struct vm_area_struct *vma, struct
> page *page);
>> +extern void __flush_dcache_user_range(struct vm_area_struct *vma,
>> + struct page *page,
>> + unsigned long adr, int len);
>> +
>> +extern inline void __flush_cache_all(void)
>> +{
>> + __flush_icache_all();
>> + __flush_dcache_all();
>> +}
>> +
>> +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
>> +do { memcpy(dst, src, len); \
>> + flush_icache_user_range(vma, page, vaddr, len); \
>> +} while (0)
>> +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
>> + memcpy(dst, src, len)
>> +
>> +#endif /* _ASM_MICROBLAZE_CACHEFLUSH_H */
>> --
>> 1.5.4.GIT
>>
>> ___________________________
>> microblaze-uclinux mailing list
>> microblaze-uclinux@xxxxxxxxxxxxxx
>> Project Home Page :
> http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
>> Mailing List Archive :
> http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>
>
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/