Message ID | 20220621192034.3332546-18-sudeep.holla@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4F3EC43334 for <linux-arm-kernel@archiver.kernel.org>; Tue, 21 Jun 2022 19:31:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hdlQzME9b+Fm2YMZgRTalvvSKzCIMsyi1uj/uFOV+DA=; b=Y+q3Pg7qndWfFR cRN33Jl5pKkj8SE4U5zVDmIVE27EDeva6Y2nTxesmsPvKGXE6ZOOaWYrJMLghXh6Oeska04WeONxj Q8SKaq0D1J7Nov02YPMD/pN2ShsEnm7V57kpUAtJpPRae1p9dueW2NdHcU2Ew437G2p71/lU7AoxC 6D1/pdcMstVdqwbG2Unz+mDoGJl+CxBhlhjOx3MVGWmEi6GRUC0UuFaCJy9k0e0szozU6Q3k+DVYm LpNPJ3HYgzFwURO5Dl2j8oyb1+Wrpo8ehj1OCFX1Q4O/kcRtuPTDc3j4nkin6vKLdd/7KyYmbcgui T/zBtZn7AbCKNFv7oDmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3jaJ-006tS5-1x; Tue, 21 Jun 2022 19:30:47 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3jRC-006oA4-3C; Tue, 21 Jun 2022 19:21:24 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DC6E8165C; Tue, 21 Jun 2022 12:21:21 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D18AE3F792; Tue, 21 Jun 2022 12:21:19 -0700 (PDT) From: Sudeep Holla <sudeep.holla@arm.com> To: linux-kernel@vger.kernel.org, Greg KH <gregkh@linuxfoundation.org> Cc: Sudeep Holla <sudeep.holla@arm.com>, Atish Patra <atishp@atishpatra.org>, Atish Patra <atishp@rivosinc.com>, Vincent Guittot <vincent.guittot@linaro.org>, Dietmar Eggemann <dietmar.eggemann@arm.com>, Qing Wang <wangqing@vivo.com>, Rob Herring <robh+dt@kernel.org>, "Rafael J . Wysocki" <rafael@kernel.org>, Ionela Voinescu <ionela.voinescu@arm.com>, Pierre Gondois <pierre.gondois@arm.com>, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, Darren Hart <darren@os.amperecomputing.com> Subject: [PATCH v4 17/20] arch_topology: Limit span of cpu_clustergroup_mask() Date: Tue, 21 Jun 2022 20:20:31 +0100 Message-Id: <20220621192034.3332546-18-sudeep.holla@arm.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220621192034.3332546-1-sudeep.holla@arm.com> References: <20220621192034.3332546-1-sudeep.holla@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220621_122122_263423_64C4440F X-CRM114-Status: GOOD ( 11.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
arch_topology: Updates to add socket support and fix cluster ids
|
expand
|
diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index 42448a5a9412..39be5dbaf4da 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -675,6 +675,14 @@ const struct cpumask *cpu_coregroup_mask(int cpu) const struct cpumask *cpu_clustergroup_mask(int cpu) { + /* + * Forbid cpu_clustergroup_mask() to span more or the same CPUs as + * cpu_coregroup_mask(). + */ + if (cpumask_subset(cpu_coregroup_mask(cpu), + &cpu_topology[cpu].cluster_sibling)) + return get_cpu_mask(cpu); + return &cpu_topology[cpu].cluster_sibling; }