From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62609CCA473 for ; Mon, 6 Jun 2022 14:50:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240060AbiFFOuA (ORCPT ); Mon, 6 Jun 2022 10:50:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240032AbiFFOt6 (ORCPT ); Mon, 6 Jun 2022 10:49:58 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0E8B81499; Mon, 6 Jun 2022 07:49:56 -0700 (PDT) Received: from fraeml745-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LGx9R1CJBz67ms2; Mon, 6 Jun 2022 22:45:15 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml745-chm.china.huawei.com (10.206.15.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 6 Jun 2022 16:49:55 +0200 Received: from localhost (10.202.226.42) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 6 Jun 2022 15:49:54 +0100 Date: Mon, 6 Jun 2022 15:49:52 +0100 From: Jonathan Cameron To: Ira Weiny CC: Dan Williams , Bjorn Helgaas , Alison Schofield , "Vishal Verma" , Dave Jiang , "Ben Widawsky" , , , Subject: Re: [PATCH V9 6/9] cxl/port: Read CDAT table Message-ID: <20220606154952.000008c7@Huawei.com> In-Reply-To: References: <20220531152632.1397976-1-ira.weiny@intel.com> <20220531152632.1397976-7-ira.weiny@intel.com> <20220601163540.00006978@Huawei.com> <20220601173113.000005a6@Huawei.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.42] X-ClientProxiedBy: lhreml728-chm.china.huawei.com (10.201.108.79) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Jun 2022 15:47:37 -0700 Ira Weiny wrote: > On Thu, Jun 02, 2022 at 11:31:56AM -0700, Ira wrote: > > On Wed, Jun 01, 2022 at 05:31:13PM +0100, Jonathan Cameron wrote: > > > On Wed, 1 Jun 2022 16:35:40 +0100 > > > Jonathan Cameron wrote: > > > > > > > On Tue, 31 May 2022 08:26:29 -0700 > > > > ira.weiny@intel.com wrote: > > > > > > > > > From: Jonathan Cameron > > > > > > > > > > The OS will need CDAT data from CXL devices to properly set up > > > > > interleave sets. Currently this is supported through a DOE mailbox > > > > > which supports CDAT. > > > > > > > > > > Cache the CDAT data for later parsing. Provide a sysfs binary attribute > > > > > to allow dumping of the CDAT. > > > > > > > > > > Binary dumping is modeled on /sys/firmware/ACPI/tables/ > > > > > > > > > > The ability to dump this table will be very useful for emulation of real > > > > > devices once they become available as QEMU CXL type 3 device emulation will > > > > > be able to load this file in. > > > > > > > > > > This does not support table updates at runtime. It will always provide > > > > > whatever was there when first cached. Handling of table updates can be > > > > > implemented later. > > > > > > > > > > Finally create a complete list of DOE defines within cdat.h for code > > > > > wishing to decode the CDAT table. > > > > > > > > > > Signed-off-by: Jonathan Cameron > > > > > Co-developed-by: Ira Weiny > > > > > Signed-off-by: Ira Weiny > > > > > > > > > > > > > Fun question of ownership inline... > > > > > > And a follow up due to triggering a bug that predated this series... > > > > > > I'd send a fix, but I'm off on a long weekend shortly :) > > > > NP I discussed with Dan and the use of dev_groups should allow me to move this > > to port probe where it belongs. I put it here for the sysfs stuff. > > Not to make a habit of replying to my own mails but this works. > > So I'm going to go forward with spinning this again. It's the right solution - cleaner than moving the ownership. Jonathan > > Ira