From a2cee032ec1afe36876c84a6d3e297d71022838f Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sat, 29 Sep 2012 18:54:40 +0000 Subject: Proide a mips_sync() macro to wrap asm("sync"), and replace gazillions of such statements with it. --- sys/arch/sgi/localbus/int.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/arch/sgi/localbus/int.c') diff --git a/sys/arch/sgi/localbus/int.c b/sys/arch/sgi/localbus/int.c index 076ea6f17c5..7ca9437d126 100644 --- a/sys/arch/sgi/localbus/int.c +++ b/sys/arch/sgi/localbus/int.c @@ -1,4 +1,4 @@ -/* $OpenBSD: int.c,v 1.6 2012/07/18 19:56:02 miod Exp $ */ +/* $OpenBSD: int.c,v 1.7 2012/09/29 18:54:39 miod Exp $ */ /* $NetBSD: int.c,v 1.24 2011/07/01 18:53:46 dyoung Exp $ */ /* @@ -245,8 +245,8 @@ int2_splx(int newipl) __asm__ (".set noreorder"); ci->ci_ipl = newipl; - __asm__ ("sync" ::: "memory"); - __asm__ (".set reorder"); + mips_sync(); + __asm__ (".set reorder\n"); sr = disableintr(); /* XXX overkill? */ int2_write(INT2_LOCAL1_MASK, (int2_intem >> 8) & ~int2_l1imask[newipl]); @@ -350,7 +350,7 @@ int2_attach(struct device *parent, struct device *self, void *aux) TIMER_SEL1 | TIMER_16BIT | TIMER_SWSTROBE); int2_write(INT2_TIMER_CONTROL, TIMER_SEL2 | TIMER_16BIT | TIMER_SWSTROBE); - __asm__ __volatile__ ("sync" ::: "memory"); + mips_sync(); delay(4); int2_write(INT2_TIMER_CLEAR, 0x03); @@ -493,7 +493,7 @@ int_8254_cal(void) int2_write(INT2_TIMER_CONTROL, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT); int2_write(INT2_TIMER_0, freq & 0xff); - __asm__ ("sync" ::: "memory"); + mips_sync(); delay(4); int2_write(INT2_TIMER_0, freq >> 8); @@ -501,7 +501,7 @@ int_8254_cal(void) int2_write(INT2_TIMER_CONTROL, TIMER_SEL2 | TIMER_RATEGEN | TIMER_16BIT); int2_write(INT2_TIMER_2, 2); - __asm__ ("sync" ::: "memory"); + mips_sync(); delay(4); int2_write(INT2_TIMER_2, 0); -- cgit v1.2.3