···437437 memtable_init(mi);438438 if (mdesc->map_io)439439 mdesc->map_io();440440- flush_tlb_all();440440+ local_flush_tlb_all();441441442442 /*443443 * initialise the zones within each node
···290290})291291292292#ifdef CONFIG_SMP293293-#error SMP not supported294293295294#define smp_mb() mb()296295#define smp_rmb() rmb()···303304#define smp_wmb() barrier()304305#define smp_read_barrier_depends() do { } while(0)305306307307+#endif /* CONFIG_SMP */308308+306309#if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110)307310/*308311 * On the StrongARM, "swp" is terminally broken since it bypasses the···317316 *318317 * We choose (1) since its the "easiest" to achieve here and is not319318 * dependent on the processor type.319319+ *320320+ * NOTE that this solution won't work on an SMP system, so explcitly321321+ * forbid it here.320322 */323323+#ifdef CONFIG_SMP324324+#error SMP is not supported on SA1100/SA110325325+#else321326#define swp_is_buggy327327+#endif322328#endif323329324330static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)···368360369361 return ret;370362}371371-372372-#endif /* CONFIG_SMP */373363374364#endif /* __ASSEMBLY__ */375365
+22-6
include/asm-arm/tlbflush.h
···235235236236#define tlb_flag(f) ((always_tlb_flags & (f)) || (__tlb_flag & possible_tlb_flags & (f)))237237238238-static inline void flush_tlb_all(void)238238+static inline void local_flush_tlb_all(void)239239{240240 const int zero = 0;241241 const unsigned int __tlb_flag = __cpu_tlb_flags;···253253 asm("mcr%? p15, 0, %0, c8, c5, 0" : : "r" (zero));254254}255255256256-static inline void flush_tlb_mm(struct mm_struct *mm)256256+static inline void local_flush_tlb_mm(struct mm_struct *mm)257257{258258 const int zero = 0;259259 const int asid = ASID(mm);···282282}283283284284static inline void285285-flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)285285+local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)286286{287287 const int zero = 0;288288 const unsigned int __tlb_flag = __cpu_tlb_flags;···313313 asm("mcr%? p15, 0, %0, c8, c5, 1" : : "r" (uaddr));314314}315315316316-static inline void flush_tlb_kernel_page(unsigned long kaddr)316316+static inline void local_flush_tlb_kernel_page(unsigned long kaddr)317317{318318 const int zero = 0;319319 const unsigned int __tlb_flag = __cpu_tlb_flags;···384384/*385385 * Convert calls to our calling convention.386386 */387387-#define flush_tlb_range(vma,start,end) __cpu_flush_user_tlb_range(start,end,vma)388388-#define flush_tlb_kernel_range(s,e) __cpu_flush_kern_tlb_range(s,e)387387+#define local_flush_tlb_range(vma,start,end) __cpu_flush_user_tlb_range(start,end,vma)388388+#define local_flush_tlb_kernel_range(s,e) __cpu_flush_kern_tlb_range(s,e)389389+390390+#ifndef CONFIG_SMP391391+#define flush_tlb_all local_flush_tlb_all392392+#define flush_tlb_mm local_flush_tlb_mm393393+#define flush_tlb_page local_flush_tlb_page394394+#define flush_tlb_kernel_page local_flush_tlb_kernel_page395395+#define flush_tlb_range local_flush_tlb_range396396+#define flush_tlb_kernel_range local_flush_tlb_kernel_range397397+#else398398+extern void flush_tlb_all(void);399399+extern void flush_tlb_mm(struct mm_struct *mm);400400+extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr);401401+extern void flush_tlb_kernel_page(unsigned long kaddr);402402+extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);403403+extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);404404+#endif389405390406/*391407 * if PG_dcache_dirty is set for the page, we need to ensure that any