-/* $OpenBSD: bonito.c,v 1.33 2017/05/17 11:52:25 visa Exp $ */
+/* $OpenBSD: bonito.c,v 1.34 2018/02/24 11:42:30 visa Exp $ */
/* $NetBSD: bonito_mainbus.c,v 1.11 2008/04/28 20:23:10 martin Exp $ */
/* $NetBSD: bonito_pci.c,v 1.5 2008/04/28 20:23:28 martin Exp $ */
struct cpu_info *ci = curcpu();
/* Update masks to new ipl. Order highly important! */
- __asm__ (".set noreorder\n");
ci->ci_ipl = newipl;
- mips_sync();
- __asm__ (".set reorder\n");
bonito_setintrmask(newipl);
/* If we still have softints pending trigger processing. */
if (ci->ci_softpending != 0 && newipl < IPL_SOFTINT)
rc = 1;
ih->ih_count.ec_count++;
}
- __asm__ (".set noreorder\n");
curcpu()->ci_ipl = frame->ipl;
- mips_sync();
- __asm__ (".set reorder\n");
}
if (rc == 0) {
printf("spurious interrupt %d\n", bitno);
-/* $OpenBSD: generic2e_machdep.c,v 1.9 2017/04/30 16:45:45 mpi Exp $ */
+/* $OpenBSD: generic2e_machdep.c,v 1.10 2018/02/24 11:42:31 visa Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
ih->ih_count.ec_count++;
}
- __asm__ (".set noreorder\n");
curcpu()->ci_ipl = frame->ipl;
- mips_sync();
- __asm__ (".set reorder\n");
+
if (ret == 1)
break;
}
-/* $OpenBSD: isa_machdep.c,v 1.3 2012/09/29 19:24:31 miod Exp $ */
+/* $OpenBSD: isa_machdep.c,v 1.4 2018/02/24 11:42:31 visa Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
struct cpu_info *ci = curcpu();
/* Update masks to new ipl. Order highly important! */
- __asm__ (".set noreorder\n");
ci->ci_ipl = newipl;
- mips_sync();
- __asm__ (".set reorder\n");
loongson_isa_setintrmask(newipl);
/* If we still have softints pending trigger processing. */
if (ci->ci_softpending != 0 && newipl < IPL_SOFTINT)
-/* $OpenBSD: loongson3_intr.c,v 1.6 2018/01/23 14:47:21 visa Exp $ */
+/* $OpenBSD: loongson3_intr.c,v 1.7 2018/02/24 11:42:31 visa Exp $ */
/*
* Copyright (c) 2016 Visa Hankala
return irq;
}
-static inline void
-setipl(struct cpu_info *ci, int newipl)
-{
- asm volatile (
- " .set push\n"
- " .set noreorder\n");
- ci->ci_ipl = newipl;
- mips_sync();
- asm volatile (
- " .set pop\n");
-}
-
void
loongson3_intr_init(void)
{
{
struct cpu_info *ci = curcpu();
- setipl(ci, newipl);
+ ci->ci_ipl = newipl;
if (CPU_IS_PRIMARY(ci))
REGVAL(LS3_IRT_INTENSET(0)) =
printf("spurious interrupt %d\n", irq);
}
- setipl(ci, ipl);
+ ci->ci_ipl = ipl;
/* Re-enable processed interrupts. */
REGVAL(LS3_IRT_INTENSET(0)) = imr;
loongson3_ht_pic->pic_eoi(irq);
}
- setipl(ci, ipl);
+ ci->ci_ipl = ipl;
/* Re-enable HT interrupts. */
REGVAL(LS3_IRT_INTENSET(0)) = 1u << LS3_IRQ_HT1(0);
-/* $OpenBSD: yeeloong_machdep.c,v 1.26 2017/05/23 16:53:15 visa Exp $ */
+/* $OpenBSD: yeeloong_machdep.c,v 1.27 2018/02/24 11:42:31 visa Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
rc = 1;
ih->ih_count.ec_count++;
}
- __asm__ (".set noreorder\n");
curcpu()->ci_ipl = frame->ipl;
- mips_sync();
- __asm__ (".set reorder\n");
if (ret == 1)
break;
}
-/* $OpenBSD: cpu.h,v 1.123 2018/01/29 14:53:01 visa Exp $ */
+/* $OpenBSD: cpu.h,v 1.124 2018/02/24 11:42:31 visa Exp $ */
/*-
* Copyright (c) 1992, 1993
int ci_want_resched; /* need_resched() invoked */
cpuid_t ci_cpuid; /* our CPU ID */
uint32_t ci_randseed; /* per cpu random seed */
- int ci_ipl; /* software IPL */
+ volatile int ci_ipl; /* software IPL */
uint32_t ci_softpending; /* pending soft interrupts */
int ci_clock_started;
u_int32_t ci_cpu_counter_last; /* last compare value loaded */
-/* $OpenBSD: interrupt.c,v 1.68 2017/06/11 10:01:23 visa Exp $ */
+/* $OpenBSD: interrupt.c,v 1.69 2018/02/24 11:42:31 visa Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
if (ci->ci_ipl < IPL_SOFTINT && ci->ci_softpending != 0) {
s = splsoft();
dosoftint();
- __asm__ (".set noreorder\n");
ci->ci_ipl = s; /* no-overhead splx */
- mips_sync();
- __asm__ (".set reorder\n");
}
ci->ci_intrdepth--;
struct cpu_info *ci = curcpu();
int oldipl;
- __asm__ (".set noreorder\n");
oldipl = ci->ci_ipl;
- if (oldipl < newipl) {
- /* XXX to kill warning about dla being used in a delay slot */
- __asm__("nop");
+ if (oldipl < newipl)
ci->ci_ipl = newipl;
- }
- mips_sync();
- __asm__ (".set reorder\n");
return oldipl;
}
-/* $OpenBSD: octcit.c,v 1.5 2018/01/23 14:47:21 visa Exp $ */
+/* $OpenBSD: octcit.c,v 1.6 2018/02/24 11:42:31 visa Exp $ */
/*
* Copyright (c) 2017 Visa Hankala
if (!ISSET(destpp, CIU3_DEST_PP_INT_INTR))
goto spurious;
- __asm__ (".set noreorder\n");
ipl = ci->ci_ipl;
- mips_sync();
- __asm__ (".set reorder\n");
intsn = (destpp & CIU3_DEST_PP_INT_INTSN) >>
CIU3_DEST_PP_INT_INTSN_SHIFT;
break;
}
- __asm__ (".set noreorder\n");
ci->ci_ipl = ipl;
- mips_sync();
- __asm__ (".set reorder\n");
spurious:
if (handled == 0)
struct cpu_info *ci = curcpu();
unsigned int core = ci->ci_cpuid;
- /* Update IPL. Order highly important! */
- __asm__ (".set noreorder\n");
ci->ci_ipl = newipl;
- mips_sync();
- __asm__ (".set reorder\n");
if (newipl < sc->sc_minipl[ci->ci_cpuid])
CIU3_WR_8(sc, CIU3_IDT_PP(CIU3_IDT(core, 0)), 1ul << core);
-/* $OpenBSD: octciu.c,v 1.9 2018/01/23 14:47:21 visa Exp $ */
+/* $OpenBSD: octciu.c,v 1.10 2018/02/24 11:42:31 visa Exp $ */
/*
* Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se)
* Now process allowed interrupts.
*/
- __asm__ (".set noreorder\n");
ipl = ci->ci_ipl;
- mips_sync();
- __asm__ (".set reorder\n");
while ((irq = octciu_next_irq(&isr)) >= 0) {
irq += bank->id * BANK_SIZE;
printf("spurious interrupt %d\n", irq);
}
- __asm__ (".set noreorder\n");
ci->ci_ipl = ipl;
- mips_sync();
- __asm__ (".set reorder\n");
/*
* Reenable interrupts which have been serviced.
struct octciu_softc *sc = octciu_sc;
struct octciu_cpu *scpu = &sc->sc_cpu[ci->ci_cpuid];
- /* Update IPL. Order highly important! */
- __asm__ (".set noreorder\n");
ci->ci_ipl = newipl;
- mips_sync();
- __asm__ (".set reorder\n");
/* Set hardware masks. */
bus_space_write_8(sc->sc_iot, sc->sc_ioh, scpu->scpu_ibank[0].en,
-/* $OpenBSD: int.c,v 1.14 2017/02/11 03:44:22 visa Exp $ */
+/* $OpenBSD: int.c,v 1.15 2018/02/24 11:42:31 visa Exp $ */
/* $NetBSD: int.c,v 1.24 2011/07/01 18:53:46 dyoung Exp $ */
/*
struct cpu_info *ci = curcpu();
register_t sr;
- __asm__ (".set noreorder");
ci->ci_ipl = newipl;
- mips_sync();
- __asm__ (".set reorder\n");
sr = disableintr(); /* XXX overkill? */
int2_write(INT2_LOCAL1_MASK, (int2_intem >> 8) & ~int2_l1imask[newipl]);
-/* $OpenBSD: macebus.c,v 1.66 2017/05/11 15:47:45 visa Exp $ */
+/* $OpenBSD: macebus.c,v 1.67 2018/02/24 11:42:31 visa Exp $ */
/*
* Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se)
struct cpu_info *ci = curcpu();
/* Update masks to new ipl. Order highly important! */
- __asm__ (".set noreorder\n");
ci->ci_ipl = newipl;
- mips_sync();
- __asm__ (".set reorder\n");
crime_setintrmask(newipl);
/* If we still have softints pending trigger processing. */
if (ci->ci_softpending != 0 && newipl < IPL_SOFTINT)
-/* $OpenBSD: intr_template.c,v 1.18 2017/02/11 03:44:22 visa Exp $ */
+/* $OpenBSD: intr_template.c,v 1.19 2018/02/24 11:42:31 visa Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
int lvl, bitno;
uint64_t tmpisr;
- __asm__ (".set noreorder\n");
ipl = ci->ci_ipl;
- mips_sync();
- __asm__ (".set reorder\n");
/* Service higher level interrupts first */
for (lvl = NIPLS - 1; lvl != IPL_NONE; lvl--) {
if (ih->ih_level < IPL_IPI)
setsr(sr);
#endif
- __asm__ (".set noreorder\n");
ci->ci_ipl = ipl;
- mips_sync();
- __asm__ (".set reorder\n");
if (ret == 1)
break;
}
-/* $OpenBSD: ip27_machdep.c,v 1.78 2018/01/29 14:51:57 visa Exp $ */
+/* $OpenBSD: ip27_machdep.c,v 1.79 2018/02/24 11:42:31 visa Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
struct cpu_info *ci = curcpu();
/* Update masks to new ipl. Order highly important! */
- __asm__ (".set noreorder\n");
ci->ci_ipl = newipl;
- mips_sync();
- __asm__ (".set reorder\n");
ip27_hub_setintrmask(newipl);
/* If we still have softints pending trigger processing. */
-/* $OpenBSD: xheart.c,v 1.31 2017/02/11 03:44:22 visa Exp $ */
+/* $OpenBSD: xheart.c,v 1.32 2018/02/24 11:42:31 visa Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
struct cpu_info *ci = curcpu();
/* Update masks to new ipl. Order highly important! */
- __asm__ (".set noreorder\n");
ci->ci_ipl = newipl;
- mips_sync();
- __asm__ (".set reorder\n");
xheart_setintrmask(newipl);
/* If we still have softints pending trigger processing. */