Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1585510lkv; Wed, 19 May 2021 13:24:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyA4wQeOCQyeYsULiC8cIMRhwTH3FzIglBV35KdzfeM5mXXwbe9vysEBHeFoKnFO9hFT9b7 X-Received: by 2002:a05:6e02:1c42:: with SMTP id d2mr911715ilg.286.1621455858169; Wed, 19 May 2021 13:24:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621455858; cv=none; d=google.com; s=arc-20160816; b=TtPZW19yB1ptH4gf9+owruggujO5gh/+5cFA8Q9BI6pLJT+jCNUnnxP8PBuFuc3Mrq Fkh81MVTcPyxtyrrRG2D1BnNqrA+MbwriotfE2LW7LDkL28Fr8pu3QoHsdJegi2D+ao5 /IQNWCWV1XarTND+5yvaLoJp3hMM8sO4Q+p6Mjm//p1qlUMUkWUaLp9tBU92quQjZ0vW aymtxcsWCHfvBNRcIr6HW/RblfYIItezmzbjHZKdX65zGBWDPD6t3hmJLEx/gyWOx7Yx 2zVbLHFune23z+RPNiVN7CCa1JA+XOQra1HyLfZWq1WDX1KsUHmrdrdOIzocMYBxyLyh Z0iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=OlxoSwTyBGcIB+AvV2WfDn1g1Sf/3pWsJB/YRZB8SB8=; b=GRGY7cLoH9qmP7QmQwRVDixlAGe75atl4vSLte+8PlwwJbojzpJEfxwTDbNjb/VDH9 K+ZhqYHrVk06cy7uEBdUmD83UbLB0xqdiCt1zuH1tUe+6IJfdVn3NJZE+12o1DpCqt8E Jh8PFx25gq/yTG5UDUgR6bCefon6rFovr5YilZm7f3VUtbMPQKXo0A0m+ypvGk8YtzTI rJR0FxCoUVgtJ3KswGTomyBtClYpneFikuvUkHEM1gO+bP9Y/xC1TpiNC7cAGhANC2Tr xBgZVaH2WTiLvEg+3CzjN6d4H/BCYPdvzI8mr+tQ5+FWzjJyFpFzCNNfnOcAJEgcy+ZA At0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=1dh0Q+cx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n5si854502ilj.6.2021.05.19.13.24.05; Wed, 19 May 2021 13:24:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=1dh0Q+cx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232479AbhESUCc (ORCPT + 99 others); Wed, 19 May 2021 16:02:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232463AbhESUCc (ORCPT ); Wed, 19 May 2021 16:02:32 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0CAFC061763 for ; Wed, 19 May 2021 13:01:11 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id t3so16733106edc.7 for ; Wed, 19 May 2021 13:01:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OlxoSwTyBGcIB+AvV2WfDn1g1Sf/3pWsJB/YRZB8SB8=; b=1dh0Q+cxVbEWRDmbm9CbH3FmdqIYJe8AQBGdaFSXXRTRAU50YTKYucb5bSElHQPTK1 Lv7Cc8hcGY8Leks6KtL54P+GEsSL7ZzHs9Ys03+8y7Uo6LGzaBH5et1EMJpA6MqboF7d dzbjjXf0OOlXr3SgohVT+LZCuju7dgik6T+NVkiwR70FiBTjiTMyz6gW86PcTkuD2EIM SUYq4mZmDjcOp/FALakgTnus6G9wyiTUGTq7mi1Hq+k1Z6akiGnqyz6b58BCCLoRnfRV qsfACgNRDDs2QVQDf+3Tj3FfouX4mQcV45NPfvFPUl3SuhuIeA92MXc+/xVPADipFOwb W8og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OlxoSwTyBGcIB+AvV2WfDn1g1Sf/3pWsJB/YRZB8SB8=; b=DouZZGJGm8xFiPQOTF0S0m5iNq3TrH7S0Rta6sXPmhPPiW9TkibSLOO/qZNZy3XOyY OSRanoIbcX5RqW7NZjrVy1u/YbampAd6Pz7QgUFUei9NYRWrN9wx4QNDm8R6TQHuIjlo OayXpgDR3T51dU7lmcuSxb4zuwav96bdOhzJrXipP9pFOkFjlCxmqwFZ5X6tltbnzkvQ e5Uj39Ls7ABcY1z7x00PyO0Fqc2QEcYoqt7mV1XFYr0PlNf6eIZgIt0mnIlE/tp+hB2F dhNGHbLn2h7hHmi0Iid3ZirESaZzJBYWD+rfqCKCAE5dDKFTNLCzbWmemuvIvwsawUIf urJQ== X-Gm-Message-State: AOAM532y8fhbXooHCO5E8A6wn7paXxDOMM7Jp/zlWY9hknMXWUnBI088 UFFDBEyQppozCxVkLIx+oeKeiX+50ZMBGY3dSV1+CxHlU0/mIw== X-Received: by 2002:a05:6402:128f:: with SMTP id w15mr808464edv.354.1621454470538; Wed, 19 May 2021 13:01:10 -0700 (PDT) MIME-Version: 1.0 References: <20210415232610.603273-3-ben.widawsky@intel.com> <20210415232750.604112-1-ben.widawsky@intel.com> In-Reply-To: <20210415232750.604112-1-ben.widawsky@intel.com> From: Dan Williams Date: Wed, 19 May 2021 13:01:00 -0700 Message-ID: Subject: Re: [PATCH 3/3] cxl/mem: Demarcate vendor specific capability IDs To: Ben Widawsky Cc: linux-cxl@vger.kernel.org, Linux PCI , Linux ACPI , "Weiny, Ira" , Vishal L Verma , "Schofield, Alison" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 15, 2021 at 4:27 PM Ben Widawsky wrote: > > Vendor capabilities occupy 0x8000 to 0xFFFF according to CXL 2.0 spec > 8.2.8.2.1 CXL Device Capabilities. While they are not defined by the > spec, they are allowed and not "unknown". Call this detail out in the > logs to let users easily distinguish the difference. > > v2: Should be greater than or equal to (Ben) > > Fixes: 8adaf747c9f0b ("cxl/mem: Find device capabilities") > Signed-off-by: Ben Widawsky > --- > drivers/cxl/mem.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c > index c05617b0ba4b..28c7c29567b3 100644 > --- a/drivers/cxl/mem.c > +++ b/drivers/cxl/mem.c > @@ -939,7 +939,10 @@ static int cxl_mem_setup_regs(struct cxl_mem *cxlm) > cxlm->memdev_regs = register_block; > break; > default: > - dev_dbg(dev, "Unknown cap ID: %x (0x%x)\n", cap_id, offset); > + if (cap_id >= 0x8000) > + dev_dbg(dev, "Vendor cap ID: %x (0x%x)\n", cap_id, offset); > + else > + dev_dbg(dev, "Unknown cap ID: %x (0x%x)\n", cap_id, offset); This wants the same %#x fixup that Vishal noted on patch2 [1], and I think it would be useful to clarify that the second number is indeed an offset: "Unknown cap_id: %#x offset: %#x\n" [1]: http://lore.kernel.org/r/40063fe52fcaa066a42d352b13128b6762277542.camel@intel.com