Commit e89f85b9 authored by James Morse's avatar James Morse Committed by Borislav Petkov

x86/resctrl: Remove struct rdt_membw::max_delay

max_delay is used by x86's __get_mem_config_intel() as a local variable.
Remove it, replacing it with a local variable.
Signed-off-by: default avatarJames Morse <james.morse@arm.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Reviewed-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Link: https://lkml.kernel.org/r/20200708163929.2783-3-james.morse@arm.com
parent abe8f12b
...@@ -254,16 +254,16 @@ static bool __get_mem_config_intel(struct rdt_resource *r) ...@@ -254,16 +254,16 @@ static bool __get_mem_config_intel(struct rdt_resource *r)
{ {
union cpuid_0x10_3_eax eax; union cpuid_0x10_3_eax eax;
union cpuid_0x10_x_edx edx; union cpuid_0x10_x_edx edx;
u32 ebx, ecx; u32 ebx, ecx, max_delay;
cpuid_count(0x00000010, 3, &eax.full, &ebx, &ecx, &edx.full); cpuid_count(0x00000010, 3, &eax.full, &ebx, &ecx, &edx.full);
r->num_closid = edx.split.cos_max + 1; r->num_closid = edx.split.cos_max + 1;
r->membw.max_delay = eax.split.max_delay + 1; max_delay = eax.split.max_delay + 1;
r->default_ctrl = MAX_MBA_BW; r->default_ctrl = MAX_MBA_BW;
if (ecx & MBA_IS_LINEAR) { if (ecx & MBA_IS_LINEAR) {
r->membw.delay_linear = true; r->membw.delay_linear = true;
r->membw.min_bw = MAX_MBA_BW - r->membw.max_delay; r->membw.min_bw = MAX_MBA_BW - max_delay;
r->membw.bw_gran = MAX_MBA_BW - r->membw.max_delay; r->membw.bw_gran = MAX_MBA_BW - max_delay;
} else { } else {
if (!rdt_get_mb_table(r)) if (!rdt_get_mb_table(r))
return false; return false;
......
...@@ -369,8 +369,6 @@ struct rdt_cache { ...@@ -369,8 +369,6 @@ struct rdt_cache {
/** /**
* struct rdt_membw - Memory bandwidth allocation related data * struct rdt_membw - Memory bandwidth allocation related data
* @max_delay: Max throttle delay. Delay is the hardware
* representation for memory bandwidth.
* @min_bw: Minimum memory bandwidth percentage user can request * @min_bw: Minimum memory bandwidth percentage user can request
* @bw_gran: Granularity at which the memory bandwidth is allocated * @bw_gran: Granularity at which the memory bandwidth is allocated
* @delay_linear: True if memory B/W delay is in linear scale * @delay_linear: True if memory B/W delay is in linear scale
...@@ -378,7 +376,6 @@ struct rdt_cache { ...@@ -378,7 +376,6 @@ struct rdt_cache {
* @mb_map: Mapping of memory B/W percentage to memory B/W delay * @mb_map: Mapping of memory B/W percentage to memory B/W delay
*/ */
struct rdt_membw { struct rdt_membw {
u32 max_delay;
u32 min_bw; u32 min_bw;
u32 bw_gran; u32 bw_gran;
u32 delay_linear; u32 delay_linear;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment