diff options
| author | Nate Lawson <njl@FreeBSD.org> | 2005-02-05 16:31:58 +0000 |
|---|---|---|
| committer | Nate Lawson <njl@FreeBSD.org> | 2005-02-05 16:31:58 +0000 |
| commit | 0a9145a2f211e1fb7be961e0810569ded80ff1ee (patch) | |
| tree | 35142632bd7e2c8820bf7a5e5666c2ff9479cea6 /sys/dev/cpufreq | |
| parent | ece1f5fe45943ba1f3f0f61f223e3a48bc3c3825 (diff) | |
Notes
Diffstat (limited to 'sys/dev/cpufreq')
| -rw-r--r-- | sys/dev/cpufreq/ichss.c | 5 |
1 files 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)) { |
