From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2561727F00E; Fri, 27 Jun 2025 08:59:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751014761; cv=none; b=XZPBoQ0UPgc4LSIcodB7VmWzZ89hVQVgQOr7EkWKz8V89DmcIYoyh19JGwJVU2yvJfhP0FagVLg5EoyBjZ4fO1YD2ABYItT2SaO72r3ztNiIYWxqzgAinEzRECQRQrgy2fyBuKUmLbEq6smVcvsCdW43DSofgL6KgEcXkTvZcGY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751014761; c=relaxed/simple; bh=A1ls2QONi1HTJeB1xlRmG2gDlIH5hR+Xj4YKW5rLLWY=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GpzeWBg3+c6KVbE1MyK7R2vX1h3bFKDMu4V8csxNGFGGEffYwq2diih4VmdDm07TQHCrGm0nRzJaIDMxyE+ni3+KuL2xDKLwtR/kPVL/uW4Uz6AUQY+gElqaNagm1md90yjDqt6f7lB7ivsYueCjSSk7DkMOfggv/O2tpJ2ixpQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4bT8Yd5JdTz6L5Hn; Fri, 27 Jun 2025 16:56:37 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id B31F91404F9; Fri, 27 Jun 2025 16:59:15 +0800 (CST) Received: from localhost (10.48.153.213) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 27 Jun 2025 10:59:14 +0200 Date: Fri, 27 Jun 2025 09:59:13 +0100 From: Jonathan Cameron To: CC: , , , , , , , , , Alejandro Lucero Subject: Re: [PATCH v17 10/22] cx/memdev: Indicate probe deferral Message-ID: <20250627095913.000024e0@huawei.com> In-Reply-To: <20250624141355.269056-11-alejandro.lucero-palau@amd.com> References: <20250624141355.269056-1-alejandro.lucero-palau@amd.com> <20250624141355.269056-11-alejandro.lucero-palau@amd.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100010.china.huawei.com (7.191.174.197) To frapeml500008.china.huawei.com (7.182.85.71) On Tue, 24 Jun 2025 15:13:43 +0100 wrote: > From: Alejandro Lucero > > The first step for a CXL accelerator driver that wants to establish new > CXL.mem regions is to register a 'struct cxl_memdev'. That kicks off > cxl_mem_probe() to enumerate all 'struct cxl_port' instances in the > topology up to the root. > > If the port driver has not attached yet the expectation is that the > driver waits until that link is established. The common cxl_pci driver > has reason to keep the 'struct cxl_memdev' device attached to the bus > until the root driver attaches. An accelerator may want to instead defer > probing until CXL resources can be acquired. > > Use the @endpoint attribute of a 'struct cxl_memdev' to convey when a > accelerator driver probing should be deferred vs failed. Provide that > indication via a new cxl_acquire_endpoint() API that can retrieve the > probe status of the memdev. > > Signed-off-by: Alejandro Lucero This looks fine to me, but it needs more eyes. Reviewed-by: Jonathan Cameron