Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2256210ybd; Mon, 24 Jun 2019 03:24:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyc4Raojv6/FsZfGH96opoixZoAlaFKmPUYm4f443lstcYZV5jS+XhwaP/BKGR3RPNOSrrk X-Received: by 2002:a17:902:e082:: with SMTP id cb2mr27952205plb.274.1561371898296; Mon, 24 Jun 2019 03:24:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561371898; cv=none; d=google.com; s=arc-20160816; b=EuiAD9h1hn4IlYbsXIsvOBx8NwwIvnLbLRVm2yQqT1q4gRY540hQIU8ro0/PxnOJ22 ohZRYjk4XqE8HLrqsfAh2ODcTB/Jdv5bQvLs+ZP9TKjYMQ9HigOr0/G/NDukal2ArI0k 0XKgRXzB1ouaR1ydkhz/RoWY1rVoDsps35EZuRDuHO62vOmkVMcV1M8Cmh/2SFdVtnp2 +Crz0taQYFadPpo6CSlie87iVOyddRNHs76EMewD8lAJPBjfXnNOOreEd355vuCXMLUb /VxNrCE6lGhrXqF606FGjigpwSlhxg348UjcvqAqCQPmWwHSC3sljZkSOO0W/EQ3SKm6 8Muw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6RBHKZ8EXcU3HRmALhRqew4vxvct9dzyPq3ed0ISBCs=; b=cYq0PP+PnCOJxOYLk2Ubp/k2cH1y/0vuTCOon09I0S8D0oczOZcLR68mox15LBjzwM I4m3MGTbMpTVGfc8ygbseK1bxoE8dR+4IeocAMlMu5tak+bhFM3idknvPjSf1ooh+SyJ IZF1zh1OT2i8E7qZ2USJusmB0+oZp+xVYmDPKn2DshqKjfKiU8y7QcEcyuzW5zIEGw+T Fn9QfZtaiRfyDfo9/MdoVsjaCxQpD2KjNCVIr04ovF17nHKhVGhsYsLlwFayPsfn6WvM BGaE4fUKTd46Mj4Rnjd7d39SSlciVI2IbKLIk3wF6sCgz7vSkc/iqlwMHe2nW9aAj1ee m5+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="MzUDWJ6/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b36si10224628pla.289.2019.06.24.03.24.42; Mon, 24 Jun 2019 03:24:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="MzUDWJ6/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730972AbfFXKWB (ORCPT + 99 others); Mon, 24 Jun 2019 06:22:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:57746 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730921AbfFXKV7 (ORCPT ); Mon, 24 Jun 2019 06:21:59 -0400 Received: from localhost (f4.8f.5177.ip4.static.sl-reverse.com [119.81.143.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8BD0620645; Mon, 24 Jun 2019 10:21:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561371718; bh=frhO+TbRuAu+T3t1CklAnZNS8Zq3HC8vnugaw+gMgaE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MzUDWJ6/WkFGWxOMPQMT+U73rslePKscP2JHPdqodQUb+DrU2KTFOMMEQY4JOB93X hpZwifb/DV3SIknJh1nc7FJVKgcl8rQN5qFgCovZ7nUoXyA7VTyLiAzqexXaJ7/qvk hQqbiOWUkOuQ7rkltRtygRmIJY/qyhHevNd3I2hY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, James Morse , Thomas Gleixner , Reinette Chatre , Fenghua Yu , Borislav Petkov , H Peter Avin Subject: [PATCH 5.1 121/121] x86/resctrl: Dont stop walking closids when a locksetup group is found Date: Mon, 24 Jun 2019 17:57:33 +0800 Message-Id: <20190624092326.791973238@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190624092320.652599624@linuxfoundation.org> References: <20190624092320.652599624@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Morse commit 87d3aa28f345bea77c396855fa5d5fec4c24461f upstream. When a new control group is created __init_one_rdt_domain() walks all the other closids to calculate the sets of used and unused bits. If it discovers a pseudo_locksetup group, it breaks out of the loop. This means any later closid doesn't get its used bits added to used_b. These bits will then get set in unused_b, and added to the new control group's configuration, even if they were marked as exclusive for a later closid. When encountering a pseudo_locksetup group, we should continue. This is because "a resource group enters 'pseudo-locked' mode after the schemata is written while the resource group is in 'pseudo-locksetup' mode." When we find a pseudo_locksetup group, its configuration is expected to be overwritten, we can skip it. Fixes: dfe9674b04ff6 ("x86/intel_rdt: Enable entering of pseudo-locksetup mode") Signed-off-by: James Morse Signed-off-by: Thomas Gleixner Acked-by: Reinette Chatre Cc: Fenghua Yu Cc: Borislav Petkov Cc: H Peter Avin Cc: Link: https://lkml.kernel.org/r/20190603172531.178830-1-james.morse@arm.com [Dropped comment due to lack of space] Signed-off-by: James Morse Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -2556,7 +2556,7 @@ static int rdtgroup_init_alloc(struct rd if (closid_allocated(i) && i != closid) { mode = rdtgroup_mode_by_closid(i); if (mode == RDT_MODE_PSEUDO_LOCKSETUP) - break; + continue; /* * If CDP is active include peer * domain's usage to ensure there