Commit 2d641fb4 authored by Zeng Heng's avatar Zeng Heng
Browse files

arm64/mpam: fix MBA granularity conversion formula

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



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

Correct MBA granularity conversion formula.

Fixes: 58db5c68 ("untested: arm_mpam: resctrl: Add support for MB resource")
Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent a345fade
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -519,7 +519,7 @@ static u32 get_mba_granularity(struct mpam_props *cprops)
		 * bwa_wd is the number of bits implemented in the 0.xxx
		 * fixed point fraction. 1 bit is 50%, 2 is 25% etc.
		 */
		return MAX_MBA_BW / (cprops->bwa_wd + 1);
		return MAX_MBA_BW / (1 << cprops->bwa_wd);
	}

	return 0;