diff -urN 2.3.47pre2/arch/alpha/kernel/alpha_ksyms.c imb/arch/alpha/kernel/alpha_ksyms.c --- 2.3.47pre2/arch/alpha/kernel/alpha_ksyms.c Thu Feb 17 20:20:29 2000 +++ imb/arch/alpha/kernel/alpha_ksyms.c Fri Feb 18 04:42:44 2000 @@ -170,6 +170,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_irq_holder); diff -urN 2.3.47pre2/arch/alpha/kernel/smp.c imb/arch/alpha/kernel/smp.c --- 2.3.47pre2/arch/alpha/kernel/smp.c Thu Feb 17 20:20:29 2000 +++ imb/arch/alpha/kernel/smp.c Fri Feb 18 04:42:44 2000 @@ -871,6 +871,22 @@ } static void +ipi_imb(void) +{ + 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.3.47pre2/include/asm-alpha/pgalloc.h imb/include/asm-alpha/pgalloc.h --- 2.3.47pre2/include/asm-alpha/pgalloc.h Thu Feb 17 20:22:11 2000 +++ imb/include/asm-alpha/pgalloc.h Fri Feb 18 04:46:59 2000 @@ -9,7 +9,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_icache_page(vma, page) do { } while (0) /*