mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-23 09:46:59 +03:00
hwpm: Disable setting fs_info for hypervisor
Set the floorsweeping information for IPs only if the configuration is non Hypervisor. Force enable IPs are only valid for native-Linux config. On hypervisor config, a driver is allowed to only remap addresses owned by the device node. Thus, ioremap of perfmux addresses is not allowed in hypervisor configuration. Add check to prevent force enable IPs and ioremap in hypervisor configuration. JIRA THWPM-45 Change-Id: I8fe6d3c4984c66be5a117e0cc2164ea20a5374cb Signed-off-by: vasukis <vasukis@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2674003 Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Seema Khowala <seemaj@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
778356e12d
commit
09ca7098e4
@@ -83,6 +83,12 @@ static u32 ip_readl(struct tegra_soc_hwpm *hwpm,
|
||||
u64 reg_addr = tegra_hwpm_safe_add_u64(
|
||||
aperture->start_abs_pa, offset);
|
||||
|
||||
if (is_tegra_hypervisor_mode()) {
|
||||
tegra_hwpm_err(hwpm,
|
||||
"Fallback method not implemented on hypervisor config");
|
||||
return 0U;
|
||||
}
|
||||
|
||||
ptr = ioremap(reg_addr, 0x4);
|
||||
if (!ptr) {
|
||||
tegra_hwpm_err(hwpm,
|
||||
@@ -131,6 +137,12 @@ static void ip_writel(struct tegra_soc_hwpm *hwpm,
|
||||
u64 reg_addr = tegra_hwpm_safe_add_u64(
|
||||
aperture->start_abs_pa, offset);
|
||||
|
||||
if (is_tegra_hypervisor_mode()) {
|
||||
tegra_hwpm_err(hwpm,
|
||||
"Fallback method not implemented on hypervisor config");
|
||||
return;
|
||||
}
|
||||
|
||||
ptr = ioremap(reg_addr, 0x4);
|
||||
if (!ptr) {
|
||||
tegra_hwpm_err(hwpm,
|
||||
|
||||
Reference in New Issue
Block a user