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 1B9B72820A6; Wed, 7 May 2025 14:37:09 +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=1746628632; cv=none; b=S7CyN7lNcxqfrlDLcQ3iWyRlz1DguW90hjp8G2BkFg/ujxL2qQ7kaoT62qIkLUAhpPfqWQbOhNZhOzyDZ9v29YUw8DYLJIcuSdMuq8vVG1CNtfgDpMweJ1wJJhtSY++w0CSYvnjrFOA1uDL/0Js+Hx1YPmyV0Oo7q46qIdN8mp4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746628632; c=relaxed/simple; bh=IrzgYnMw8m+Jwv3NBp9Bd3etxCUW42kQxYOjV1qu7jI=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=elJHushM6IARQE67oOAg2iadmNiFh7wHKQEJXUsEEr3rWplz3gZDTMiX4UQeRk2XTY62zkJ/R0jyoONgcATuvgrjMVzc71rK182aFDP94+AsnIN4LtGAJOazkvbUiN+BDY0NpMRs/yYH7VI4tKIWmxU4D8Ztp9BD1/oLNI+OoFU= 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.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4ZsyWn55g1z6K9kk; Wed, 7 May 2025 22:36:53 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 7730E1402F7; Wed, 7 May 2025 22:37:07 +0800 (CST) Received: from localhost (10.203.177.66) 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; Wed, 7 May 2025 16:37:06 +0200 Date: Wed, 7 May 2025 15:37:05 +0100 From: Jonathan Cameron To: CC: , , , , , , , , , Alejandro Lucero Subject: Re: [PATCH v14 01/22] cxl: add type2 device basic support Message-ID: <20250507153705.00005300@huawei.com> In-Reply-To: <20250417212926.1343268-2-alejandro.lucero-palau@amd.com> References: <20250417212926.1343268-1-alejandro.lucero-palau@amd.com> <20250417212926.1343268-2-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: lhrpeml100006.china.huawei.com (7.191.160.224) To frapeml500008.china.huawei.com (7.182.85.71) On Thu, 17 Apr 2025 22:29:04 +0100 wrote: > From: Alejandro Lucero > > Differentiate CXL memory expanders (type 3) from CXL device accelerators > (type 2) with a new function for initializing cxl_dev_state and a macro > for helping accel drivers to embed cxl_dev_state inside a private > struct. > > Move structs to include/cxl as the size of the accel driver private > struct embedding cxl_dev_state needs to know the size of this struct. > > Use same new initialization with the type3 pci driver. > > Signed-off-by: Alejandro Lucero > Reviewed-by: Jonathan Cameron > Reviewed-by: Dave Jiang I decided to take one final look at this. Trivial header question inline. > diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h > index be8a7dc77719..fd7e2f3811a2 100644 > --- a/drivers/cxl/cxl.h > +++ b/drivers/cxl/cxl.h > @@ -11,6 +11,7 @@ > #include > #include > #include > +#include > diff --git a/include/cxl/cxl.h b/include/cxl/cxl.h > new file mode 100644 > index 000000000000..a8ffcc5c2b32 > --- /dev/null > +++ b/include/cxl/cxl.h > @@ -0,0 +1,210 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* Copyright(c) 2020 Intel Corporation. */ > +/* Copyright(c) 2025 Advanced Micro Devices, Inc. */ > + > +#ifndef __CXL_CXL_H__ > +#define __CXL_CXL_H__ > + > +#include Why this include? Maybe needed in a later patch? > +#include > +#include > +#include