From 0a9145a2f211e1fb7be961e0810569ded80ff1ee Mon Sep 17 00:00:00 2001 From: Nate Lawson Date: Sat, 5 Feb 2005 16:31:58 +0000 Subject: [PATCH] Use intr_disable/restore() instead of disable_intr() since the latter is not MI. This should fix build on non i386 platforms. --- sys/dev/cpufreq/ichss.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/cpufreq/ichss.c b/sys/dev/cpufreq/ichss.c index ea126b650de7..3c9ee53128b0 100644 --- a/sys/dev/cpufreq/ichss.c +++ b/sys/dev/cpufreq/ichss.c @@ -305,6 +305,7 @@ ichss_set(device_t dev, const struct cf_setting *set) struct ichss_softc *sc; uint8_t bmval, new_val, old_val, req_val; uint64_t rate; + register_t regs; /* Look up appropriate bit value based on frequency. */ sc = device_get_softc(dev); @@ -317,7 +318,7 @@ ichss_set(device_t dev, const struct cf_setting *set) DPRINT("ichss: requested setting %d\n", req_val); /* Disable interrupts and get the other register contents. */ - disable_intr(); + regs = intr_disable(); old_val = ICH_GET_REG(sc->ctrl_reg) & ~ICHSS_CTRL_BIT; /* @@ -331,7 +332,7 @@ ichss_set(device_t dev, const struct cf_setting *set) /* Get the new value and re-enable interrupts. */ new_val = ICH_GET_REG(sc->ctrl_reg); - enable_intr(); + intr_restore(regs); /* Check if the desired state was indeed selected. */ if (req_val != (new_val & ICHSS_CTRL_BIT)) {