Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp114739lqp; Thu, 4 Apr 2024 08:23:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWxJj9kCuQazzEtsJGkvYmSQU7qiwyrw0NyFU9PGAywChZi734jnBB6/99QyU2ySzMiuMfs1ZBTs+294VgnCwpPogOmzKjSUvQYtCbKjw== X-Google-Smtp-Source: AGHT+IEtlEyZK9r3cmkDoZTyRsOTrNZhZbZtkRclLApzi4DYvnsMlmv4Gx9Gj7mbR5iHD+2Abu/5 X-Received: by 2002:a17:907:10c2:b0:a51:7962:a75d with SMTP id rv2-20020a17090710c200b00a517962a75dmr2022950ejb.9.1712244224292; Thu, 04 Apr 2024 08:23:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712244224; cv=pass; d=google.com; s=arc-20160816; b=OuB7L2OlfBCAqlDvd87kLibwuaUnlguE/YD24i+TtP5NuVOyFIFLjXS8MDy5WPUNd/ vZiFd+J1uawQ/F4S7aX+UwdvEvEJFoq/SLxmtXuHotWia0BSHN4dw5gMWEwPoNO8mFTF rDrwN6Rmqx65X9hFU/m7YVPpPcZosyQrTtAYIH/mFbJAJMNSJomX2DrrNXsoOg7QIXE/ FVxlUBuqjsae/aUifRofXig0Zj/+mMYQxbOuMFz1W8PXzBaxbHrm6Qc0Gu5qz8Oj0k4j LxATCtAwWM6WXSs61fyk8iTqkizOV00jh6FpAHVf5tJCG+Zj8m0Wa60r8Sgx1zLW8D+J D/RA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=Z4GbnlOiTnIrWFrbIsS2NiEYJJKDczgq6fE43nJhqhM=; fh=oNisMWpEcvm2DtsgRWUV2Wser7pCk8sGpM8IY4kS9gA=; b=xaoa/uWlheZxmKxdnK/jrVxCPYH3Ri+lI976Kwee5KT1T6MiRn9BoWTC/lSZGJVqTd axUQSv6Nfn8BC1tKV/IDBarvF3mHAk7Uy8TdshP0Mu27ZV90GUob6r1BCYN0kLCAHlGU fFG6S8UY/KD4gLlfWKK2eUsqTs/GzaTkX3k4lQ1tRbc68+EzhoFCHA8rpJO0almXILDA teksDPzJjYN3HvvZ1PkF0dqCjWKUyrVjbxZa+lFNpw2ha/JCTahlVnCyj3KO2y0PWnlS AeuZJZK0wvLUcyF10zlwHQ02ZBOTS+92sreg+gMPySSxHpFixeUXOfkUMs9WI2g19YqF oarQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-131713-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131713-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id fx25-20020a170906b75900b00a51986fe367si151017ejb.23.2024.04.04.08.23.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 08:23:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131713-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-131713-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131713-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0BF011F2AFD8 for ; Thu, 4 Apr 2024 15:23:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB651129A6D; Thu, 4 Apr 2024 15:22:53 +0000 (UTC) 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 9829354905; Thu, 4 Apr 2024 15:22:49 +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=1712244173; cv=none; b=moDvLx796axkDjFTkt7ac8CYQpzl5hScZPwCztOIVnN8TNgJ7rYltD5JeNGd3TQvUkG6CpL0ATdFYzIOXKjHN1j9EfAsd8Q5cZYUPGQQlr4Fv3j8RhOanF5l7q3UoVFqmKh/13XOJCLXn1qfkx8kKjKftI0sArRC4TPtqrYGLwk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712244173; c=relaxed/simple; bh=pbUrWoLTt60RMl4SBLLdVoc3LE5DMHxvXjAxlhr3pLQ=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Efle/ojEaYo0WdJgyB2mwcRuy8FTXZ4d/eWXfqft5omapH13LZ4hV1nIXHSCUbPErRDKIFuZ0q9+62H+ujzCvSllKsKBfNqllaqBj+iNq6DDX1V46wGxOvIyEr3vz3gYWxJUEWyDMuis7mOk4SebX8iDd2BwFd/DSnHaVXUAMvo= 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.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4V9QH34qBCz6J7YY; Thu, 4 Apr 2024 23:18:07 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 028B5140A87; Thu, 4 Apr 2024 23:22:47 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 4 Apr 2024 16:22:46 +0100 Date: Thu, 4 Apr 2024 16:22:45 +0100 From: Jonathan Cameron To: CC: Dave Jiang , Fan Ni , "Navneet Singh" , Dan Williams , Davidlohr Bueso , Alison Schofield , Vishal Verma , , , Subject: Re: [PATCH 13/26] cxl/mem: Configure dynamic capacity interrupts Message-ID: <20240404162245.000032f3@Huawei.com> In-Reply-To: <20240324-dcd-type2-upstream-v1-13-b7b00d623625@intel.com> References: <20240324-dcd-type2-upstream-v1-0-b7b00d623625@intel.com> <20240324-dcd-type2-upstream-v1-13-b7b00d623625@intel.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@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: lhrpeml500002.china.huawei.com (7.191.160.78) To lhrpeml500005.china.huawei.com (7.191.163.240) On Sun, 24 Mar 2024 16:18:16 -0700 ira.weiny@intel.com wrote: > From: Navneet Singh > > Dynamic Capacity Devices (DCD) support extent change notifications > through the event log mechanism. The interrupt mailbox commands were > extended in CXL 3.1 to support these notifications. > > Firmware can't configure DCD events to be FW controlled but can retain > control of memory events. Split irq configuration of memory events and > DCD events to allow for FW control of memory events while DCD is host > controlled. > > Configure DCD event log interrupts on devices supporting dynamic > capacity. Disable DCD if interrupts are not supported. > > Signed-off-by: Navneet Singh > Co-developed-by: Ira Weiny > Signed-off-by: Ira Weiny Trivial comment inline and Fan's suggestion on the debug print seems sensible to me. Either way Reviewed-by: Jonathan Cameron > /** > * cxl_dev_dynamic_capacity_identify() - Reads the dynamic capacity > diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h > index 15d418b3bc9b..d585f5fdd3ae 100644 > --- a/drivers/cxl/cxl.h > +++ b/drivers/cxl/cxl.h > @@ -164,11 +164,13 @@ static inline int ways_to_eiw(unsigned int ways, u8 *eiw) > #define CXLDEV_EVENT_STATUS_WARN BIT(1) > #define CXLDEV_EVENT_STATUS_FAIL BIT(2) > #define CXLDEV_EVENT_STATUS_FATAL BIT(3) > +#define CXLDEV_EVENT_STATUS_DCD BIT(4) > > #define CXLDEV_EVENT_STATUS_ALL (CXLDEV_EVENT_STATUS_INFO | \ > CXLDEV_EVENT_STATUS_WARN | \ > CXLDEV_EVENT_STATUS_FAIL | \ > - CXLDEV_EVENT_STATUS_FATAL) > + CXLDEV_EVENT_STATUS_FATAL| \ Space after L You could realign the others but I wouldn't bother. > + CXLDEV_EVENT_STATUS_DCD)