From patchwork Thu Apr 15 23:26:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 12206311 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A063C43611 for ; Thu, 15 Apr 2021 23:26:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9036860725 for ; Thu, 15 Apr 2021 23:26:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237783AbhDOX0r (ORCPT ); Thu, 15 Apr 2021 19:26:47 -0400 Received: from mga05.intel.com ([192.55.52.43]:7828 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236674AbhDOX0q (ORCPT ); Thu, 15 Apr 2021 19:26:46 -0400 IronPort-SDR: 6w+CmnceWvY+qgU9OHYOP2QMyKEbKJwuDXs1s3m0jGb2s0cJgVEsUqSlek/Ss9Boh9fNbqljCG c4zCY3oajL1g== X-IronPort-AV: E=McAfee;i="6200,9189,9955"; a="280279117" X-IronPort-AV: E=Sophos;i="5.82,226,1613462400"; d="scan'208";a="280279117" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2021 16:26:20 -0700 IronPort-SDR: vBd27/QSGH/VbkxNXnXmPcAJGrONBrIKlgbJfWxWtHiuaMGq0QBrc2L7/v2PwkHCyEKGjueFDo wcL47sPimiPA== X-IronPort-AV: E=Sophos;i="5.82,226,1613462400"; d="scan'208";a="522540100" Received: from oamoninu-mobl1.amr.corp.intel.com (HELO bwidawsk-mobl5.local) ([10.252.130.91]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2021 16:26:20 -0700 From: Ben Widawsky To: linux-cxl@vger.kernel.org Cc: Ben Widawsky , linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, ira.weiny@intel.com, vishal.l.verma@intel.com, alison.schofield@intel.com, dan.j.williams@intel.com, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] cxl/mem: Demarcate vendor specific capability IDs Date: Thu, 15 Apr 2021 16:26:10 -0700 Message-Id: <20210415232610.603273-3-ben.widawsky@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415232610.603273-1-ben.widawsky@intel.com> References: <20210415232610.603273-1-ben.widawsky@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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. 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..0909f73db994 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); break; } }