lkml.org 
[lkml]   [2020]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 09/10] x86/resctrl: Add arch_has_{sparse,empty}_bitmaps to explain CAT differences
From
Date
Hi James,

Thank you very much for adding the handling of empty bitmaps. This looks
good to me, just one comment ...

On 5/18/2020 6:19 AM, James Morse wrote:
> -bool cbm_validate_intel(char *buf, u32 *data, struct rdt_resource *r)
> +static bool cbm_validate(char *buf, u32 *data, struct rdt_resource *r)
> {
> unsigned long first_bit, zero_bit, val;
> unsigned int cbm_len = r->cache.cbm_len;
> @@ -93,7 +95,8 @@ bool cbm_validate_intel(char *buf, u32 *data, struct rdt_resource *r)
> return false;
> }
>
> - if (val == 0 || val > r->default_ctrl) {
> + if ((!r->cache.arch_has_empty_bitmaps && val == 0) ||
> + (val > r->default_ctrl)) {
> rdt_last_cmd_puts("Mask out of range\n");
> return false;

There is unnecessary parentheses around 'val > r->default_ctrl'

Reinette

\
 
 \ /
  Last update: 2020-05-19 20:55    [W:0.170 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site