-                                rdmsrl(msrs[i], val);
-
-                                /* CntP bit set? */
-                                if (val & BIT_64(62)) {
-                                       val &= ~BIT_64(62);
-                                       wrmsrl(msrs[i], val);
-                                }
+                                /* Clear CntP bit safely */
+                                msr_clear_bit(msrs[i], 62);

Very nice! Clean solution with less lines of code than the original.

Acked-by: Tony Luck <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to