* [PATCH] cxl/mem: Demarcate vendor specific capability IDs
@ 2021-05-20 20:48 Ben Widawsky
2021-05-20 20:55 ` Verma, Vishal L
0 siblings, 1 reply; 2+ messages in thread
From: Ben Widawsky @ 2021-05-20 20:48 UTC (permalink / raw)
To: linux-cxl
Cc: Alison Schofield, Dan Williams, Ira Weiny, Vishal Verma,
Ben Widawsky
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.
This patch is a squash of two earlier patches and take in some minor
suggestions from both Vishal and Dan.
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
---
drivers/cxl/core.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/cxl/core.c b/drivers/cxl/core.c
index 84b90db57420..38979c97158d 100644
--- a/drivers/cxl/core.c
+++ b/drivers/cxl/core.c
@@ -60,7 +60,10 @@ void cxl_setup_device_regs(struct device *dev, void __iomem *base,
regs->memdev = register_block;
break;
default:
- dev_dbg(dev, "Unknown cap ID: %d (0x%x)\n", cap_id, offset);
+ if (cap_id >= 0x8000)
+ dev_dbg(dev, "Vendor cap ID: %#x offset: %#x\n", cap_id, offset);
+ else
+ dev_dbg(dev, "Unknown cap ID: %#x offset: %#x\n", cap_id, offset);
break;
}
}
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cxl/mem: Demarcate vendor specific capability IDs
2021-05-20 20:48 [PATCH] cxl/mem: Demarcate vendor specific capability IDs Ben Widawsky
@ 2021-05-20 20:55 ` Verma, Vishal L
0 siblings, 0 replies; 2+ messages in thread
From: Verma, Vishal L @ 2021-05-20 20:55 UTC (permalink / raw)
To: Widawsky, Ben, linux-cxl@vger.kernel.org
Cc: Williams, Dan J, Schofield, Alison, Weiny, Ira
On Thu, 2021-05-20 at 13:48 -0700, 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.
>
> This patch is a squash of two earlier patches and take in some minor
> suggestions from both Vishal and Dan.
Should this be in the commit mesasge?
>
> Cc: Vishal Verma <vishal.l.verma@intel.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
> ---
Other than that, looks good to me,
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
> drivers/cxl/core.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/core.c b/drivers/cxl/core.c
> index 84b90db57420..38979c97158d 100644
> --- a/drivers/cxl/core.c
> +++ b/drivers/cxl/core.c
> @@ -60,7 +60,10 @@ void cxl_setup_device_regs(struct device *dev, void __iomem *base,
> regs->memdev = register_block;
> break;
> default:
> - dev_dbg(dev, "Unknown cap ID: %d (0x%x)\n", cap_id, offset);
> + if (cap_id >= 0x8000)
> + dev_dbg(dev, "Vendor cap ID: %#x offset: %#x\n", cap_id, offset);
> + else
> + dev_dbg(dev, "Unknown cap ID: %#x offset: %#x\n", cap_id, offset);
> break;
> }
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-20 20:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-20 20:48 [PATCH] cxl/mem: Demarcate vendor specific capability IDs Ben Widawsky
2021-05-20 20:55 ` Verma, Vishal L
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox