提交 51e721c4 编写于 作者: A Adrian Hunter 提交者: Zheng Zengkai

perf/x86/intel/pt: Fix address filter config for 32-bit kernel

stable inclusion
from stable-v5.10.110
commit c0cffc1fb38dc08a8a7750119ee41bb78906bc42
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c0cffc1fb38dc08a8a7750119ee41bb78906bc42

--------------------------------

[ Upstream commit e5524bf1 ]

Change from shifting 'unsigned long' to 'u64' to prevent the config bits
being lost on a 32-bit kernel.

Fixes: eadf48ca ("perf/x86/intel/pt: Add support for address range filtering in PT")
Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220131072453.2839535-5-adrian.hunter@intel.comSigned-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 9c628e36
...@@ -472,7 +472,7 @@ static u64 pt_config_filters(struct perf_event *event) ...@@ -472,7 +472,7 @@ static u64 pt_config_filters(struct perf_event *event)
pt->filters.filter[range].msr_b = filter->msr_b; pt->filters.filter[range].msr_b = filter->msr_b;
} }
rtit_ctl |= filter->config << pt_address_ranges[range].reg_off; rtit_ctl |= (u64)filter->config << pt_address_ranges[range].reg_off;
} }
return rtit_ctl; return rtit_ctl;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册