Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp760085pxb; Tue, 5 Apr 2022 22:07:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhF44fy65+MsSzdlWyMDuirkOsODYLaeeFLZ5u+SMPs+QL0CbrPFvvgmiemtw7u7NV5O/L X-Received: by 2002:a17:90b:3b4c:b0:1c6:d91f:fbf5 with SMTP id ot12-20020a17090b3b4c00b001c6d91ffbf5mr7942326pjb.81.1649221649460; Tue, 05 Apr 2022 22:07:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649221649; cv=none; d=google.com; s=arc-20160816; b=W59fox6BQ8494Tn8gphI8YeFFHhb4yIkOoLxmIMqqt9LfGhzBPa5LHX2tGm4XxIGGm 5Uw10qaHfj3MWroqVD4e2pTW3n/MioW+dUGwwIAHW07rGvnhd9f7q0EcE0vUz+SwPYDP JY4DIY0KWC8Tu+4adKNVAAJifb6QLBVqCAC3FKB2OBahU+tCRtBt9BlUd4RwX6x8QSsB Uk/VqNVvovKW3lG3ps/xnSNYdmzk3tIf5I04kvOMVouVZ2jpG48KOCM0hsHq0zJHd0JY ttW9Ktc0qSXjipjlL+HfIJpmfb32GLV+ySZl3T3IYGBCmOBBL+/eXM3YAMWo0+IdxYTc bLgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TUn9uqwnF5YW+pA/reHNhL2SR4N4Scft3Dp9krCv1K0=; b=eE5N0qYIDov8w5zRPgizB0NB7iyx3p5rDFr/r/vx9YmKdfB1j770rp/LkaOx7yX1ID 59tg18ZdhN3YC/eVmjFVT+BYXKx3lThY0URHcDNv3kIj7R+aQJWnEchMnCboNEkFRIm0 G13aouOxfpgJVGtr5ifXwQos6KgMWdL3F/nA0SaA9y9FzP+G9eVJXRYB2QwNlt4WQ0eO W7A1NSFyWlMoqMPoKzg03jjkvQyISj/zrJr52te3eIVF5kxkAfLbKNTR2yG8LHiHKSn8 Gc/euT6ZWhG4Xxx9wtGAj9cpiPfSAUhlKnsdpHu5v6PkuBhdK1+LjMJw03F6WBC6nxPo 00gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iAsBoB94; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id nl10-20020a17090b384a00b001c98dbffe90si4215881pjb.26.2022.04.05.22.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 22:07:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iAsBoB94; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D8B011A5D42; Tue, 5 Apr 2022 20:31:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384992AbiDEMaj (ORCPT + 99 others); Tue, 5 Apr 2022 08:30:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235003AbiDEIOp (ORCPT ); Tue, 5 Apr 2022 04:14:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 288439BAEF; Tue, 5 Apr 2022 01:03:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8978AB81B18; Tue, 5 Apr 2022 08:03:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C551BC385A1; Tue, 5 Apr 2022 08:03:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649145792; bh=seiBGHh9QwPdT6SoSG5DhIi5R0FVf3d1hYryzIDXDX4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iAsBoB94yFeQpt6uslWyXpq78Vcfk6PhO+3SAu++cvAmRndDtFaoKbHryLW+5wf55 xehN4NvSnLrKbIs3DmuBC0+FjdtXJJ26CT6e0lDiYFr/aYvA9N/HowQHZ+ZggV7UL3 7yRbXPM6cQdxN+1pNV+FR9QQtw3jNCBA2HsDl4nI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Williams , Sasha Levin Subject: [PATCH 5.17 0531/1126] tools/testing/cxl: Fix root port to host bridge assignment Date: Tue, 5 Apr 2022 09:21:18 +0200 Message-Id: <20220405070423.217388650@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Williams [ Upstream commit a4a0ce242fcd7022349212c4e2f795762e6ff050 ] Mocked root-ports are meant to be round-robin assigned to host-bridges. Fixes: 67dcdd4d3b83 ("tools/testing/cxl: Introduce a mocked-up CXL port hierarchy") Link: https://lore.kernel.org/r/164298431629.3018233.14004377108116384485.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- tools/testing/cxl/test/cxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c index 736d99006fb7..f0a410962af0 100644 --- a/tools/testing/cxl/test/cxl.c +++ b/tools/testing/cxl/test/cxl.c @@ -511,7 +511,7 @@ static __init int cxl_test_init(void) for (i = 0; i < ARRAY_SIZE(cxl_root_port); i++) { struct platform_device *bridge = - cxl_host_bridge[i / NR_CXL_ROOT_PORTS]; + cxl_host_bridge[i % ARRAY_SIZE(cxl_host_bridge)]; struct platform_device *pdev; pdev = platform_device_alloc("cxl_root_port", i); -- 2.34.1