Commit bd0e745d authored by Zeng Heng's avatar Zeng Heng
Browse files

arm64/mpam: fix bug in percent_to_mbw_max()

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8T2RT



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

Correct percentage to fixed floating point conversion formula.

Fixes: 58db5c68 ("untested: arm_mpam: resctrl: Add support for MB resource")
Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent 2d641fb4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -581,7 +581,7 @@ static u16 percent_to_mbw_max(u8 pc, struct mpam_props *cprops)
			break;
	}

	value &= GENMASK(15, 15 - cprops->bwa_wd);
	value &= GENMASK(15, 15 - cprops->bwa_wd + 1);

	return value;
}