oprofile, x86: Remove duplicate check for IBS_CAPS_OPCNT
authorRobert Richter <robert.richter@amd.com>
Tue, 21 Sep 2010 16:09:00 +0000 (18:09 +0200)
committerRobert Richter <robert.richter@amd.com>
Fri, 15 Oct 2010 10:50:41 +0000 (12:50 +0200)
Since oprofile is setting up ibs_op/dispatched_ops in the fs only if
the feature is available, its corresponding variable
ibs_config.dispatched_ops is only set, if the feature is
available. Thus the check is duplicate and can be removed.

Signed-off-by: Robert Richter <robert.richter@amd.com>
arch/x86/oprofile/op_model_amd.c

index 96852d5480e06616f7d132d9796ebd84c63fe858..d5e9dab71becc807e9f526707cdc4e1d8fee229c 100644 (file)
@@ -257,8 +257,7 @@ static inline void op_amd_start_ibs(void)
                        ibs_op_ctl = min(ibs_op_ctl + IBS_RANDOM_MAXCNT_OFFSET,
                                         IBS_OP_MAX_CNT);
                }
-               if (ibs_caps & IBS_CAPS_OPCNT && ibs_config.dispatched_ops)
-                       ibs_op_ctl |= IBS_OP_CNT_CTL;
+               ibs_op_ctl |= ibs_config.dispatched_ops ? IBS_OP_CNT_CTL : 0;
                ibs_op_ctl |= IBS_OP_ENABLE;
                val = op_amd_randomize_ibs_op(ibs_op_ctl);
                wrmsrl(MSR_AMD64_IBSOPCTL, val);