[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2f8d9fb3-da66-21ff-147b-d1f7deaaed73@intel.com>
Date: Tue, 19 May 2020 11:55:02 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: James Morse <james.morse@....com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Cc: Fenghua Yu <fenghua.yu@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
H Peter Anvin <hpa@...or.com>,
Babu Moger <Babu.Moger@....com>
Subject: Re: [PATCH v3 09/10] x86/resctrl: Add arch_has_{sparse,empty}_bitmaps
to explain CAT differences
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
Powered by blists - more mailing lists