From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA330481653 for ; Tue, 3 Mar 2026 15:21:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772551309; cv=none; b=aJprQgzae/WF+VQ6h33bswzytZlurER1F74n70Vt9Sm9nGfS9qXBI4QStTWt59lc/sjuDpbcSepBiAxNnfnYswEQcp/tB7JrHnRKDCA7KWWO3k3UL/rmb4A0NOKERsGtPSCIzo3uIU/vJ2DjV42cyTXUQmN46p2BQHUnNJmZ/Yo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772551309; c=relaxed/simple; bh=NtsBp2W1pQybKA4UPkA2oVzLpNH//0FRgvlfLKcyKyE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=itI02pbdkaWETYtmGNqtsL5H6jNu0Urf16cyGhzyhl6HgnJg3mzyi03o5frFUpLgl62OlmoOC/+RTOkCF0L1lLXWWa3I1VI2oHjMkIwOXYR81F3O15t3+mrnVCnRpfMQ7q+hWDF0QhL9gNZKhRZJNss4UYzlM3ZDOLP7H9cJSpU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=KxPilzr0; arc=none smtp.client-ip=209.85.222.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="KxPilzr0" Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-8cb4136d865so769999785a.1 for ; Tue, 03 Mar 2026 07:21:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1772551306; x=1773156106; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=b4f7AJE9Hf1AkTQ9xu88RkQP30gDThVvvbzKhqMXGvE=; b=KxPilzr09gPSV0431YywxjeTclVFlgtyEGz/u3mNWwCcNs2OUFh9A0W3Iv8xwUKgFR r+jZ3TGfRQ0iQTedEigVr5dN5A9yBFn5jmGrcC8R0eLCV4R4u90IBR7cdBm3917aFXX/ mUx+YJot01OWr0+/i5UtuS5SQoRhAfBF44ZDSA2BPZSbRpiwjSvyozi/DKPfw+S77xzi xjo8FHpeTACz3tgllfg2lm+cyb3piftFZvUPPxBoBNZ8m64BomTv6YyTejxlFKaUW4L6 puOdZn8UTd+3fjk2q8QFXaftEXWJaLrhCm/B5s9aCg1t1CIhn6awVXeqPyWDY2FBYYSs jxPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772551306; x=1773156106; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b4f7AJE9Hf1AkTQ9xu88RkQP30gDThVvvbzKhqMXGvE=; b=FUxdmF+oBAsxd44aU8Mw8KdQaQ/f4wyyUm7pPZNMNVt2T9y7N5LXeDeCAy8F1DcaGc uisbVQW/0l0KPe5ofgWEPXKxruszhEsApNBdRMNTe1oEurL5+JRKMJ2wsMPrN/Yc+QtE fSJDW0cbPKv87LJ6L8hopis1V9UYZC8cn+6viFnBZqiVH7MH5lwAsDgU4tvfpB7P1Kc4 YOV3/gIJPNWB9jAtC2yUnYl8Ovva687uzkv++ZPEOy4Vz/GsvAZ+cEmaIoYzvf1fsmCb Nsre6x4Dltys7FNyATbJe3CrKPFbyb4MbnLj6sDBhp9FH+85NBNTXCB/3nhpB0Rnbb8h leEw== X-Forwarded-Encrypted: i=1; AJvYcCVvyfmnbn4xgd3Q62sq3G8kierCHpvX4er/nDon2/jrXl94bU9tmm18jcDLABbL973A8tEnFlO1hg7MbOY=@vger.kernel.org X-Gm-Message-State: AOJu0Yy+EkHY9bpx4O96s5vZ8/pGI2E/Vam9Ad9p0UHqFS29ycuENTLh BROkDhHs7x1FJnref8Zd0izyqCy2FE19+5CICnfdwYvqqwvPoduZEHU7iRbVfv0uKs4= X-Gm-Gg: ATEYQzwgluN+sZsFSLCTlVIXvzyx9jBh8gQB03e59ty8NBacxIOfaG/gYghmlUSBWq3 2zr1xNwTHOw+DrPVqf74RatPcJrWXcvTiduPnTjwpKI1oiLq9OOWn1MDj61oOprhx+k1pvWGl33 +SPcWOL7mCa+Mr0i06v4hUXoXEFIcc4C6dQtBAFbYFf/aX+NjjEpD3u2y9C019FPJh1Bij7q+BT nZegQREQMYcT7D4J+TV2xs6bZJx5aj+mCpxL5LmmMVkUk4Mw8mxbyIjo6J6xawY4v/6CXW14nf6 RLtASKMZxPYUu5DpKTihm46en49uyp7aiwlUUxqepotb6SQ7pD2vCYH9bT0QpZC0jB7wLg1Rshp uMfMNoGp0DO7YdHpEZnQ+joP6xuIGcgBSn4kDnGeDUossHMHcMyHQTQZEXKqciKPH11oSpqguOp u/LTwEz9BkyqlVPJDfOLuLwrXkttz1A6lgZKF+B8rXL7B5QEpRuSyCDoCOh0BQoUI48lv4nNaeo cNWox0Psg== X-Received: by 2002:a05:620a:410a:b0:8c9:f996:81fd with SMTP id af79cd13be357-8cbc8df3b87mr2141883285a.33.1772551306461; Tue, 03 Mar 2026 07:21:46 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-96-255-20-138.washdc.ftas.verizon.net. [96.255.20.138]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8cbbf66f31asm1381560685a.15.2026.03.03.07.21.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Mar 2026 07:21:46 -0800 (PST) Date: Tue, 3 Mar 2026 10:21:44 -0500 From: Gregory Price To: Jonathan Cameron Cc: linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, dave@stgolabs.net, dave.jiang@intel.com, alison.schofield@intel.com, vishal.l.verma@intel.com, ira.weiny@intel.com, dan.j.williams@intel.com Subject: Re: [PATCH] cxl/acpi: fix CXL_ACPI=y + CXL_PMEM=m link failure Message-ID: References: <20260302200429.803417-1-gourry@gourry.net> <20260303101330.000039a6@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260303101330.000039a6@huawei.com> On Tue, Mar 03, 2026 at 10:13:30AM +0000, Jonathan Cameron wrote: > On Mon, 2 Mar 2026 15:04:29 -0500 > Gregory Price wrote: > > > Commit e7e222ad73d9 ("cxl: Move devm_cxl_add_nvdimm_bridge() to > > cxl_pmem.ko") moved devm_cxl_add_nvdimm_bridge() from cxl_core into > > cxl_pmem, creating a symbol dependency from cxl_acpi to cxl_pmem. > > > > When CXL_ACPI=y and CXL_PMEM=m, the built-in cxl_acpi attempts to > > link against a non-built-in cxl_pmem, which the linker cannot resolve. > > > > CXL_PMEM depends on LIBNVDIMM, so LIBNVDIMM=m constrains CXL_PMEM to > > at most =m. > > > > Change IS_ENABLED() to IS_REACHABLE(), which returns false when a > > built-in caller references a modular target, preventing the link error. > > > > The result is if the pmem/nvdimm symbols are not reachable at build > > time, then at runtime it will always return -ENODEV. > > > > Fixes: e7e222ad73d9 ("cxl: Move devm_cxl_add_nvdimm_bridge() to cxl_pmem.ko") > > Signed-off-by: Gregory Price > > What's the impact of this build combination wrt to whether the result is > actually useful? Is there any point in building CXL_PMEM as a module > without this call being made? I can't remember and normally don't care > much about PMEM :) > Basically no, it's not useful, but it's some definition of the default depending on your olddefconfig, so rather than fight with this further this basically terminates the same way DAX_CXL=m terminates. tl;dr: You don't create the dax device / nbdimm and you're sad... but it does build! ~Gregory