public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gregory Price <gourry@gourry.net>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [gourryinverse:private_compression 57/60] drivers/cxl/core/region_sysram.c:63:2: error: use of undeclared identifier 'mhp_t'
Date: Sun, 22 Feb 2026 21:00:23 +0800	[thread overview]
Message-ID: <202602222019.98YEm5RU-lkp@intel.com> (raw)

tree:   https://github.com/gourryinverse/linux private_compression
head:   9fa5ffee4fd4726e31f05deebb938cccfa0b460f
commit: baec60290631ac5603560724f70e769f8b71de4f [57/60] cxl/core: Add cxl_sysram region type
config: x86_64-buildonly-randconfig-005-20260222 (https://download.01.org/0day-ci/archive/20260222/202602222019.98YEm5RU-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260222/202602222019.98YEm5RU-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602222019.98YEm5RU-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/cxl/core/region_sysram.c:63:2: error: use of undeclared identifier 'mhp_t'
      63 |         mhp_t mhp_flags;
         |         ^
>> drivers/cxl/core/region_sysram.c:83:2: error: use of undeclared identifier 'mhp_flags'; did you mean 'pci_flags'?
      83 |         mhp_flags = MHP_NID_IS_MGID;
         |         ^~~~~~~~~
         |         pci_flags
   include/linux/pci.h:1160:21: note: 'pci_flags' declared here
    1160 | extern unsigned int pci_flags;
         |                     ^
>> drivers/cxl/core/region_sysram.c:83:14: error: use of undeclared identifier 'MHP_NID_IS_MGID'
      83 |         mhp_flags = MHP_NID_IS_MGID;
         |                     ^
>> drivers/cxl/core/region_sysram.c:89:7: error: call to undeclared function '__add_memory_driver_managed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      89 |         rc = __add_memory_driver_managed(sysram->mgid,
         |              ^
   drivers/cxl/core/region_sysram.c:92:24: error: use of undeclared identifier 'mhp_flags'
      92 |                                          sysram_res_name, mhp_flags,
         |                                                           ^
>> drivers/cxl/core/region_sysram.c:111:7: error: call to undeclared function 'offline_and_remove_memory'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     111 |         rc = offline_and_remove_memory(sysram->hpa_range.start,
         |              ^
   drivers/cxl/core/region_sysram.c:111:7: note: did you mean 'offline_and_remove_private_memory'?
   include/linux/memory_hotplug.h:314:19: note: 'offline_and_remove_private_memory' declared here
     314 | static inline int offline_and_remove_private_memory(int nid, u64 start,
         |                   ^
>> drivers/cxl/core/region_sysram.c:141:3: error: call to undeclared function 'memory_group_unregister'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     141 |                 memory_group_unregister(sysram->mgid);
         |                 ^
>> drivers/cxl/core/region_sysram.c:318:7: error: call to undeclared function 'memory_group_register_static'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     318 |         rc = memory_group_register_static(numa_node,
         |              ^
   8 errors generated.


vim +/mhp_t +63 drivers/cxl/core/region_sysram.c

    59	
    60	static int sysram_hotplug_add(struct cxl_sysram *sysram, enum mmop online_type)
    61	{
    62		struct resource *res;
  > 63		mhp_t mhp_flags;
    64		int rc;
    65	
    66		if (sysram->res)
    67			return -EBUSY;
    68	
    69		res = request_mem_region(sysram->hpa_range.start,
    70					 range_len(&sysram->hpa_range),
    71					 sysram->res_name);
    72		if (!res)
    73			return -EBUSY;
    74	
    75		sysram->res = res;
    76	
    77		/*
    78		 * Set flags appropriate for System RAM. Leave ..._BUSY clear
    79		 * so that add_memory() can add a child resource.
    80		 */
    81		res->flags = IORESOURCE_SYSTEM_RAM;
    82	
  > 83		mhp_flags = MHP_NID_IS_MGID;
    84	
    85		/*
    86		 * Ensure that future kexec'd kernels will not treat
    87		 * this as RAM automatically.
    88		 */
  > 89		rc = __add_memory_driver_managed(sysram->mgid,
    90						 sysram->hpa_range.start,
    91						 range_len(&sysram->hpa_range),
    92						 sysram_res_name, mhp_flags,
    93						 online_type);
    94		if (rc) {
    95			remove_resource(res);
    96			kfree(res);
    97			sysram->res = NULL;
    98			return rc;
    99		}
   100	
   101		return 0;
   102	}
   103	
   104	static int sysram_hotplug_remove(struct cxl_sysram *sysram)
   105	{
   106		int rc;
   107	
   108		if (!sysram->res)
   109			return 0;
   110	
 > 111		rc = offline_and_remove_memory(sysram->hpa_range.start,
   112					       range_len(&sysram->hpa_range));
   113		if (rc)
   114			return rc;
   115	
   116		if (sysram->res) {
   117			remove_resource(sysram->res);
   118			kfree(sysram->res);
   119			sysram->res = NULL;
   120		}
   121	
   122		return 0;
   123	}
   124	
   125	int cxl_sysram_offline_and_remove(struct cxl_sysram *sysram)
   126	{
   127		return sysram_hotplug_remove(sysram);
   128	}
   129	EXPORT_SYMBOL_NS_GPL(cxl_sysram_offline_and_remove, "CXL");
   130	
   131	static void cxl_sysram_release(struct device *dev)
   132	{
   133		struct cxl_sysram *sysram = to_cxl_sysram(dev);
   134	
   135		if (sysram->res)
   136			sysram_hotplug_remove(sysram);
   137	
   138		kfree(sysram->res_name);
   139	
   140		if (sysram->mgid >= 0)
 > 141			memory_group_unregister(sysram->mgid);
   142	
   143		if (sysram->mtype)
   144			clear_node_memory_type(sysram->numa_node, sysram->mtype);
   145	
   146		kfree(sysram);
   147	}
   148	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-02-22 13:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202602222019.98YEm5RU-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gourry@gourry.net \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@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