Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36239
b: refs/heads/master
c: fdfc74f
h: refs/heads/master
i:
  36237: 170f1f8
  36235: 6d3965f
  36231: 0034d5d
  36223: d653080
v: v3
  • Loading branch information
Paul Mundt committed Sep 27, 2006
1 parent a45e092 commit afa4c25
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 36efc35447154317f9ffc5163a1793b5f7ff3de1
refs/heads/master: fdfc74f9fcebdda14609159d5010b758a9409acf
5 changes: 5 additions & 0 deletions trunk/arch/sh/mm/cache-sh4.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ void flush_cache_sigtramp(unsigned long addr)
i++, index += cpu_data->icache.way_incr)
ctrl_outl(0, index); /* Clear out Valid-bit */
back_to_P1();
wmb();
local_irq_restore(flags);
}

Expand Down Expand Up @@ -223,6 +224,8 @@ void flush_dcache_page(struct page *page)
flush_cache_4096(CACHE_OC_ADDRESS_ARRAY | 0x2000, phys);
flush_cache_4096(CACHE_OC_ADDRESS_ARRAY | 0x3000, phys);
}

wmb();
}

static inline void flush_icache_all(void)
Expand All @@ -247,6 +250,7 @@ void flush_dcache_all(void)
__flush_dcache_all();
else
__flush_dcache_all_ex();
wmb();
}

void flush_cache_all(void)
Expand Down Expand Up @@ -377,5 +381,6 @@ void flush_icache_user_range(struct vm_area_struct *vma,
struct page *page, unsigned long addr, int len)
{
flush_cache_page(vma, addr, page_to_pfn(page));
mb();
}

7 changes: 7 additions & 0 deletions trunk/include/asm-sh/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,17 @@ static __inline__ unsigned long tas(volatile int *m)

extern void __xchg_called_with_bad_pointer(void);

#ifdef CONFIG_CPU_SH4A
#define mb() __asm__ __volatile__ ("synco": : :"memory")
#define rmb() mb()
#define wmb() __asm__ __volatile__ ("synco": : :"memory")
#define read_barrier_depends() do { } while(0)
#else
#define mb() __asm__ __volatile__ ("": : :"memory")
#define rmb() mb()
#define wmb() __asm__ __volatile__ ("": : :"memory")
#define read_barrier_depends() do { } while(0)
#endif

#ifdef CONFIG_SMP
#define smp_mb() mb()
Expand Down

0 comments on commit afa4c25

Please sign in to comment.