Messages in this thread | | | Subject | Re: [PATCH v3 09/10] x86/resctrl: Add arch_has_{sparse,empty}_bitmaps to explain CAT differences | From | Reinette Chatre <> | Date | Tue, 19 May 2020 11:55:02 -0700 |
| |
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
| |