diff -urN 2.2.15pre13/arch/alpha/kernel/alpha_ksyms.c imb/arch/alpha/kernel/alpha_ksyms.c --- 2.2.15pre13/arch/alpha/kernel/alpha_ksyms.c Fri Jan 7 18:19:06 2000 +++ imb/arch/alpha/kernel/alpha_ksyms.c Tue Mar 7 02:28:41 2000 @@ -160,6 +160,7 @@ EXPORT_SYMBOL(flush_tlb_mm); EXPORT_SYMBOL(flush_tlb_page); EXPORT_SYMBOL(flush_tlb_range); +EXPORT_SYMBOL(smp_imb); EXPORT_SYMBOL(cpu_data); EXPORT_SYMBOL(cpu_number_map); EXPORT_SYMBOL(global_bh_lock); diff -urN 2.2.15pre13/arch/alpha/kernel/smp.c imb/arch/alpha/kernel/smp.c --- 2.2.15pre13/arch/alpha/kernel/smp.c Wed Jan 5 14:16:51 2000 +++ imb/arch/alpha/kernel/smp.c Tue Mar 7 02:28:41 2000 @@ -839,6 +839,22 @@ } static void +ipi_imb(void *ignored) +{ + imb(); +} + +void +smp_imb(void) +{ + /* Must wait other processors to flush their icache before continue. */ + if (smp_call_function(ipi_imb, NULL, 1, 1)) + printk(KERN_CRIT "smp_imb: timed out\n"); + + imb(); +} + +static void ipi_flush_tlb_all(void *ignored) { tbia(); diff -urN 2.2.15pre13/include/asm-alpha/pgtable.h imb/include/asm-alpha/pgtable.h --- 2.2.15pre13/include/asm-alpha/pgtable.h Sat Mar 4 18:02:04 2000 +++ imb/include/asm-alpha/pgtable.h Tue Mar 7 02:29:08 2000 @@ -23,7 +23,17 @@ #define flush_cache_range(mm, start, end) do { } while (0) #define flush_cache_page(vma, vmaddr) do { } while (0) #define flush_page_to_ram(page) do { } while (0) -#define flush_icache_range(start, end) do { } while (0) +/* + * The icache is not coherent with the dcache on alpha, thus before + * running self modified code like kernel modules we must always run + * an imb(). + */ +#ifndef __SMP__ +#define flush_icache_range(start, end) imb() +#else +#define flush_icache_range(start, end) smp_imb() +extern void smp_imb(void); +#endif #define flush_dcache_page(page) do { } while (0) /*