diff options
author | Peter Jones <pjones@redhat.com> | 2006-03-03 01:32:18 +0000 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2006-03-03 01:32:18 +0000 |
commit | bc19e36a7b45e07c60bd5e62a369ae2183ecb6e0 (patch) | |
tree | ebfe4c1030142db2781bdd14184f120983b23629 | |
parent | 2791ea21a32a56f84ce7489e73d66eed7ed96fce (diff) | |
download | anaconda-bc19e36a7b45e07c60bd5e62a369ae2183ecb6e0.tar.gz anaconda-bc19e36a7b45e07c60bd5e62a369ae2183ecb6e0.tar.xz anaconda-bc19e36a7b45e07c60bd5e62a369ae2183ecb6e0.zip |
- probe acpi for cpus when the module is first loaded, and never again after
that.
-rw-r--r-- | isys/isys.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/isys/isys.py b/isys/isys.py index 89d8c21bb..53127360b 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -222,7 +222,22 @@ def smpAvailable(): htavailable = _isys.htavailable coresavailable = _isys.coresavailable -acpicpus = _isys.acpicpus + +# It's important that we cache this value. If we access the memory while X is +# running, bad things happen if you've got super-crappy video cards like the +# ATI Rage XL (mach64). So we hit it once up front when loading and then +# never again. +_acpi_ncpus = None +def acpicpus(): + global _acpi_ncpus + + if _acpi_ncpus is None: + _acpi_ncpus = _isys.acpicpus + + return _acpi_ncpus + +acpicpus() + def summitavailable(): try: |