From: Alison Schofield <alison.schofield@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: <linux-cxl@vger.kernel.org>, <nvdimm@lists.linux.dev>
Subject: Re: [NDCTL PATCH v7 3/4] ndctl: Add features.h from kernel UAPI
Date: Tue, 20 May 2025 12:08:28 -0700 [thread overview]
Message-ID: <aCzTLHm_-nQduh4P@aschofie-mobl2.lan> (raw)
In-Reply-To: <20250519200056.3901498-4-dave.jiang@intel.com>
On Mon, May 19, 2025 at 01:00:53PM -0700, Dave Jiang wrote:
> Pull in the kernel UAPI header files from CXL Features support and FWCTL.
> This is needed to support building the CXL Features unit test.
__counted_by's got supported in GCC 14.1 and appended failure was with 12.2.1.
Suggest conditionally stubbing it out like this:
diff --git a/cxl/fwctl/features.h b/cxl/fwctl/features.h
index 490606d7694b..b71a2fdf2040 100644
--- a/cxl/fwctl/features.h
+++ b/cxl/fwctl/features.h
@@ -9,6 +9,14 @@
#include <linux/types.h>
+/*
+ * Vendored Version: Do not use a compiler attribute that may not be available
+ * to user space. counted_by_'s are supported in GCC 14.1
+ */
+#ifndef __counted_by_le
+#define __counted_by_le(count)
+#endif
+
FAILED: test/fwctl.p/fwctl.c.o
cc -Itest/fwctl.p -Itest -I../test -I. -I.. -Indctl -I../ndctl -I/usr/include/uuid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O0 -g -Wchar-subscripts -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wshadow -Wsign-compare -Wstrict-prototypes -Wtype-limits -Wmaybe-uninitialized -Wdeclaration-after-statement -Wunused-result -include config.h -MD -MQ test/fwctl.p/fwctl.c.o -MF test/fwctl.p/fwctl.c.o.d -o test/fwctl.p/fwctl.c.o -c ../test/fwctl.c
In file included from ../test/fwctl.c:17:
../cxl/fwctl/features.h:105:38: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘__counted_by_le’
105 | struct cxl_feat_entry ents[] __counted_by_le(num_entries);
| ^~~~~~~~~~~~~~~
../test/fwctl.c: In function ‘cxl_fwctl_rpc_get_supported_features’:
../test/fwctl.c:323:26: error: ‘struct cxl_mbox_get_sup_feats_out’ has no member named ‘ents’
323 | entry = &feat_out->ents[0];
| ^~
[91/254] Generating symbol file daxctl/lib/libdaxctl.so.1.1.6.p/libdaxctl.so.1.1.6.symbols
ninja: build stopped: subcommand failed.
snip
next prev parent reply other threads:[~2025-05-20 19:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 20:00 [NDCTL PATCH v7 0/4] ndctl: Add support and test for CXL Features support Dave Jiang
2025-05-19 20:00 ` [NDCTL PATCH v7 1/4] cxl: Add cxl_bus_get_by_provider() Dave Jiang
2025-05-19 20:00 ` [NDCTL PATCH v7 2/4] cxl: Enumerate major/minor of FWCTL char device Dave Jiang
2025-05-20 19:11 ` Alison Schofield
2025-05-19 20:00 ` [NDCTL PATCH v7 3/4] ndctl: Add features.h from kernel UAPI Dave Jiang
2025-05-20 19:08 ` Alison Schofield [this message]
2025-05-19 20:00 ` [NDCTL PATCH v7 4/4] cxl/test: Add test for cxl features device Dave Jiang
2025-05-20 19:25 ` Alison Schofield
2025-05-21 23:22 ` Dave Jiang
2025-05-22 0:18 ` Alison Schofield
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aCzTLHm_-nQduh4P@aschofie-mobl2.lan \
--to=alison.schofield@intel.com \
--cc=dave.jiang@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox