]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/clocksource/acpi_pm.c
Merge ../linux-2.6-watchdog-mm
[linux-2.6-omap-h63xx.git] / drivers / clocksource / acpi_pm.c
index 9217be5048d53f795db98851bbfabaa67aee6d44..7fcb77a9d0111855948d5a02003c2845e8f5a8b3 100644 (file)
@@ -30,9 +30,9 @@
  * The location is detected during setup_arch(),
  * in arch/i386/acpi/boot.c
  */
-u32 pmtmr_ioport;
+u32 pmtmr_ioport __read_mostly;
 
-#define ACPI_PM_MASK 0xFFFFFF /* limit it to 24 bits */
+#define ACPI_PM_MASK CLOCKSOURCE_MASK(24) /* limit it to 24 bits */
 
 static inline u32 read_pmtmr(void)
 {
@@ -47,15 +47,15 @@ static cycle_t acpi_pm_read_verified(void)
        /*
         * It has been reported that because of various broken
         * chipsets (ICH4, PIIX4 and PIIX4E) where the ACPI PM clock
-        * source is not latched, so you must read it multiple
+        * source is not latched, you must read it multiple
         * times to ensure a safe value is read:
         */
        do {
                v1 = read_pmtmr();
                v2 = read_pmtmr();
                v3 = read_pmtmr();
-       } while ((v1 > v2 && v1 < v3) || (v2 > v3 && v2 < v1)
-                       || (v3 > v1 && v3 < v2));
+       } while (unlikely((v1 > v2 && v1 < v3) || (v2 > v3 && v2 < v1)
+                         || (v3 > v1 && v3 < v2)));
 
        return (cycle_t)v2;
 }
@@ -138,6 +138,8 @@ static void __devinit acpi_pm_check_graylist(struct pci_dev *dev)
 }
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0,
                        acpi_pm_check_graylist);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_LE,
+                       acpi_pm_check_graylist);
 #endif