Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp68388rwd; Wed, 17 May 2023 14:51:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ437066wGWQd+zNjbcZdeJYtH1LlLaybU8/aX+34vFktPAw/6pmppLUYq1nLj7X7ViXTZFq X-Received: by 2002:a17:902:ce8d:b0:1ad:c1c2:7d1a with SMTP id f13-20020a170902ce8d00b001adc1c27d1amr168403plg.63.1684360272080; Wed, 17 May 2023 14:51:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684360272; cv=none; d=google.com; s=arc-20160816; b=VblojZ7BPeSuRXPd+LyMv0yyUY5MR1HfUqZzsnbmxkLBhfIWaLMcGaZ4sJKbOFjVI9 VIZBjhoSPCLuLDDXuI3cLVcKu5DW+jOIwk1F+ukLO4r+c9fjTksDD/yhEwytvzBv9ek5 84hRthkxuzQq2OX0ysf7z2GExgFPA/wmbdKgpeiFz8Uz2ZICJRqx/yzf3Gs06bTBhqFd X5/MZbu9EUAkXWqrbdYnGc7qmLjdszSFjqlAlEZZ8hrLMpJu6nKqCPc0QMS/cWXHVcY1 G+cNbQT0piQFYyLgp9ZhJYEE5LKi3DPQPrSlqchgrNDt4nIh/NyoFEELDN8TwtohCUFX M/uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=4DuBmpQ2FJMEdV/DZK2clD+YTrp9aLAseu3uW8L9Vbw=; b=k4wSfWOT+kHgQdE5LQhJr1ON0Snwq7syCCDCtHto9y1LQEz5Am3z0x2wymjcTGKeaO HruLxJPjX+tWBPclembfSyfs3p9l+iXjiLizJRWFWAUP53cswGfZY4Doc6s/PsZkSZcB yv8rwMcFxmAaUjDIFjTipbV3PmR9UJaDAD1lILdL9I/YGFsx5q4ZGse35qHoVnnDVzBl SLWvVRDqxzMRDxoZMkldq/UjJXmZregKshNl2kt1GlhPQM7AxkwGlQJKPvNcluBUF65X xNYN6BJmOE3aP3ulizDefE9mC/+rqudG2HuBN9He2/M7p2G7yUD2pre844xDgZLAnYjR UmZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TBukkk4x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a170902d34600b001a5089fe47fsi21079933plk.326.2023.05.17.14.51.00; Wed, 17 May 2023 14:51:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TBukkk4x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229652AbjEQVbe (ORCPT + 99 others); Wed, 17 May 2023 17:31:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjEQVbc (ORCPT ); Wed, 17 May 2023 17:31:32 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A934DB4; Wed, 17 May 2023 14:31:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684359091; x=1715895091; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=jYUHuX/9rfLJhrnskJsPzKPCjulcmYzNBQ59CfkqXPk=; b=TBukkk4xCjGJrIXy/S3kshFX4SlsLf7Odp/xxAke+venvb/dsb6/UIxS 61zachntxcrNESDPvyrotSH7I96A4I1uT9Kg+xZ2duoalyEJysiOTLMX3 AchsF16CmwztFXOf3YujhDwilqbdZ+V9n0rNQoH/lQv/gVArpGbYbWGYB fJIvA5FIRslDeBMGj1CBDvdTVCBSQObOE0iU400zufaQthXQaGxh0xGLs 9Y4NB/Bx1TghgLOfFqfVb6Lv3Rd+6zuzejPmZ1c0h03CM4lGK77V9QtcZ 63mpCcBU7pW03c1omg/QR4wjMJcRDEA2k0OTsM7RG/rXZ4CITA1b5rkh3 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10713"; a="417544054" X-IronPort-AV: E=Sophos;i="5.99,283,1677571200"; d="scan'208";a="417544054" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 14:31:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10713"; a="704962540" X-IronPort-AV: E=Sophos;i="5.99,283,1677571200"; d="scan'208";a="704962540" Received: from djiang5-mobl3.amr.corp.intel.com (HELO [10.212.83.61]) ([10.212.83.61]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 14:31:30 -0700 Message-ID: <5fe7e7ef-6c60-fb05-2a55-1e576be09c7f@intel.com> Date: Wed, 17 May 2023 14:31:30 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.10.0 Subject: Re: [PATCH 3/3] tools/testing/cxl: Document test configurations Content-Language: en-US To: Ira Weiny , Dan Williams , Alison Schofield , Vishal Verma , Ben Widawsky , Jonathan Cameron Cc: linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230426-cxl-fixes-v1-0-870c4c8b463a@intel.com> <20230426-cxl-fixes-v1-3-870c4c8b463a@intel.com> From: Dave Jiang In-Reply-To: <20230426-cxl-fixes-v1-3-870c4c8b463a@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 On 5/17/23 2:28 PM, Ira Weiny wrote: > The devices created, their relationship, and intended testing purpose is > not extremely clear, especially for those unfamiliar with cxl-test. > > Document the purpose of each hierarchy. Add ASCII art to show the > relationship of devices. Group the device declarations together based > on the hierarchies. > > Signed-off-by: Ira Weiny Nice artwork :) Reviewed-by: Dave Jiang > --- > tools/testing/cxl/test/cxl.c | 75 ++++++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 73 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c > index bf00dc52fe96..bd38a5fb60ae 100644 > --- a/tools/testing/cxl/test/cxl.c > +++ b/tools/testing/cxl/test/cxl.c > @@ -23,6 +23,31 @@ static int interleave_arithmetic; > #define NR_CXL_PORT_DECODERS 8 > #define NR_BRIDGES (NR_CXL_HOST_BRIDGES + NR_CXL_SINGLE_HOST + NR_CXL_RCH) > > +/* > + * Interleave testing > + * > + * +---------------+ +---------------+ > + * | host_bridge[0]| | host_bridge[1]| > + * +-/---------\---+ +--/---------\--+ > + * /- -\ /- -\ > + * /- -\ /- -\ > + * +-------------+ +-------------+ +-------------+ +-------------+ > + * |root_port[0] | |root_port[1] | |root_port[2] | |root_port[3] | > + * +------|------+ +------|------+ +------|------+ +------|------+ > + * | | | | > + * +-------|-------+ +-------|-------+ +-------|-------+ +-------|-------+ > + * |switch_uport[0]| |switch_uport[1]| |switch_uport[2]| |switch_uport[3]| > + * +---|-------|---+ +---/-------|---+ +---/-------|---+ +---|-------\---+ > + * | \ / \ / \ / \ > + * +----|----++--|------++---------++----|----++---------++----|----++----|----++---------+ > + * |switch ||switch ||switch ||switch ||switch ||switch ||switch ||switch | > + * |_dport[0]||_dport[1]||_dport[2]||_dport[3]||_dport[4]||_dport[5]||_dport[6]||_dport[7]| > + * +----|----++--|------++----|----++----|----++----|----++----|----++----|----++----|----+ > + * | | | | | | | | > + * +---|--+ +-|----+ +---|--+ +---|--+ +--|---+ +---|--+ +---|--+ +---|--+ > + * |mem[0]| |mem[1]| |mem[2]| |mem[3]| |mem[4]| |mem[5]| |mem[6]| |mem[7]| > + * +------+ +------+ +------+ +------+ +------+ +------+ +------+ +------+ > + */ > static struct platform_device *cxl_acpi; > static struct platform_device *cxl_host_bridge[NR_CXL_HOST_BRIDGES]; > #define NR_MULTI_ROOT (NR_CXL_HOST_BRIDGES * NR_CXL_ROOT_PORTS) > @@ -31,16 +56,51 @@ static struct platform_device *cxl_switch_uport[NR_MULTI_ROOT]; > #define NR_MEM_MULTI \ > (NR_CXL_HOST_BRIDGES * NR_CXL_ROOT_PORTS * NR_CXL_SWITCH_PORTS) > static struct platform_device *cxl_switch_dport[NR_MEM_MULTI]; > +struct platform_device *cxl_mem[NR_MEM_MULTI]; > > +/* > + * 1) Preconfigured region support (Simulated BIOS configured region) > + * 2) 'Pass-through' decoder > + * > + * +---------------+ > + * | hb_single | > + * +------|--------+ > + * | > + * +------|--------+ > + * | root_single | > + * +------|--------+ > + * | > + * +----------|----------+ > + * | swu_single | > + * +-----|-----------|---+ > + * | | > + * +-----|-----+ +--|--------+ > + * |swd_single | | swd_single| > + * +-----|-----+ +----|------+ > + * | | > + * +------|-----+ +----|-------+ > + * |mem_single | |mem_single | > + * +------------+ +------------+ > + */ > static struct platform_device *cxl_hb_single[NR_CXL_SINGLE_HOST]; > static struct platform_device *cxl_root_single[NR_CXL_SINGLE_HOST]; > static struct platform_device *cxl_swu_single[NR_CXL_SINGLE_HOST]; > #define NR_MEM_SINGLE (NR_CXL_SINGLE_HOST * NR_CXL_SWITCH_PORTS) > static struct platform_device *cxl_swd_single[NR_MEM_SINGLE]; > - > -struct platform_device *cxl_mem[NR_MEM_MULTI]; > struct platform_device *cxl_mem_single[NR_MEM_SINGLE]; > > +/* > + * 1) RCD > + * 2) Type-2 (Accelerator) > + * > + * +-----+ > + * | rch | > + * +--|--+ > + * | > + * +-|--+ > + * |rcd | > + * +----+ > + */ > static struct platform_device *cxl_rch[NR_CXL_RCH]; > static struct platform_device *cxl_rcd[NR_CXL_RCH]; > > @@ -64,6 +124,17 @@ static inline bool is_single_bridge(struct device *dev) > return false; > } > > +/* > + * +---------------+ +---------------+ > + * | host_bridge[0]| | host_bridge[1]| > + * +---------------+ +---------------+ > + * +---------------+ > + * | hb_single | (host_bridge[2]) > + * +---------------+ > + * +-----+ > + * | rch | (host_bridge[3]) > + * +-----+ > + */ > static struct acpi_device acpi0017_mock; > static struct acpi_device host_bridge[NR_BRIDGES] = { > [0] = { >