Message ID | 20230214103054.1082908-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2891508wrn; Tue, 14 Feb 2023 02:40:41 -0800 (PST) X-Google-Smtp-Source: AK7set/GwGj2SVbG6iU9oRVfBj6bKoxbRe169Ejq3U/0Q5FZqLuxi5AilHOw7ng4XjUzWPfAEChx X-Received: by 2002:a17:90b:164e:b0:231:1a70:8af1 with SMTP id il14-20020a17090b164e00b002311a708af1mr2046646pjb.13.1676371240887; Tue, 14 Feb 2023 02:40:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676371240; cv=none; d=google.com; s=arc-20160816; b=gBTyDbKppwugczzfCt3cG9/dlBo5QrhAHMUvmYkYeUhvkXs7d3ANQuNPQ6BWvdWjP6 sGOphJliIoR9B0QZM9B97wslryRJi18oe27fcEyhDsTeX5FQ9RXIQJP2HNpBtj4b+QRp F/4oO+JRIu45fl2GuNGnO+jA53wErod4+CmvB4Z4F//dIRceX68sfVGqZRJTwvnF4WfH PLFmc4/GYJ/lmLX51xepcpR5KgpK8EOL4gDiy7OwSpjOAbjAQM1w2hjUdKjBwszkH+wS KnFMS9vWKzgPGrloASA5vQ+IHmT8kP9pvp25bR5n6BceJWW3suD8526AKackO2LSls++ 11/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HpfIUorEWu4nGi/03szdwHq0qjqIQkoqCD/3Yhaiwjo=; b=JUZYhPLotfj8Ys0emIj04ORRonBp+xUCNVmB5U6n5+0DOIi9aXw0b8dK1BM9t8mdbT Sis3AO0J5Pn8V1+YXuE/BwV/cusVYV4Lh1ZRMvY4FQfCylST9KJ3Rk9Us2WwA4goiieP FNpUAVMRW5LrnRAffDpV+8gTGiYDlJIoUNk74cQ6j/JR+2jTJmER7TAfbEMlKXsKE9JQ jywJYNDBDnUKGEgS/ObRtcPx7CljnRktbaGWaJ4qaauA+nOL9xsy0nL8+qtvxwfT13gh dDGLbSmadxcD4vsqiPfng45crM9yll/byDAw3ERk506yvFxxGfuLG7hjVEPbjfo+jCbV HWVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JKND1mVz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e15-20020a17090a684f00b00234246f5f77si2346101pjm.21.2023.02.14.02.40.28; Tue, 14 Feb 2023 02:40:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JKND1mVz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232475AbjBNKbC (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Tue, 14 Feb 2023 05:31:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229742AbjBNKbB (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Feb 2023 05:31:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18FA223871; Tue, 14 Feb 2023 02:30:59 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8045761515; Tue, 14 Feb 2023 10:30:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82987C433EF; Tue, 14 Feb 2023 10:30:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676370657; bh=QJBK9fHdKNNn92kOAjyh7kUpQvGURF1xEy3HVB5T/Dc=; h=From:To:Cc:Subject:Date:From; b=JKND1mVz0GMn70yw0aPGiB3Ta6kH+7ZpQQNnJ8enVN0JD6eyZ/59oLMx0Jh8YnJ7l u5l3Zx9H9WXfBjK7r/JHtiOw/veDF4MhF4h/uPfEvHmb0SVSat3hR/bCYWR/B0+00X lT3OvgGvcr/x/ax118lxVMXvEA6nTnAXCgRonN/9AuZu1KFO32fuSRu7gzzGP3PNlO zF24WVGsOfq7oM13G6hTw38p96vjR7gV2IQXydK8Dd0maJzn7XUT3EOjPyT7ZGacXx vpC37pv8MRmPzOL70eOL3iIw/VbD2294RGrLCP81SBCZHFHqjF3nmawqsjdh4OZPoD easqmDgagv5Cw== From: Arnd Bergmann <arnd@kernel.org> To: Dan Williams <dan.j.williams@intel.com>, Vishal Verma <vishal.l.verma@intel.com>, Dave Jiang <dave.jiang@intel.com>, Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Arnd Bergmann <arnd@arndb.de>, Gregory Price <gregory.price@memverge.com>, John Ogness <john.ogness@linutronix.de>, "Paul E. McKenney" <paulmck@kernel.org>, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dax: clx: add CXL_REGION dependency Date: Tue, 14 Feb 2023 11:30:49 +0100 Message-Id: <20230214103054.1082908-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757802650262431159?= X-GMAIL-MSGID: =?utf-8?q?1757802650262431159?= |
Series |
dax: clx: add CXL_REGION dependency
|
|
Commit Message
Arnd Bergmann
Feb. 14, 2023, 10:30 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de> There is already a dependency on CXL_REGION, which depends on CXL_BUS, but since CXL_REGION is a 'bool' symbol, it's possible to configure DAX as built-in even though CXL itself is a loadable module: x86_64-linux-ld: drivers/dax/cxl.o: in function `cxl_dax_region_probe': cxl.c:(.text+0xb): undefined reference to `to_cxl_dax_region' x86_64-linux-ld: drivers/dax/cxl.o: in function `cxl_dax_region_driver_init': cxl.c:(.init.text+0x10): undefined reference to `__cxl_driver_register' x86_64-linux-ld: drivers/dax/cxl.o: in function `cxl_dax_region_driver_exit': cxl.c:(.exit.text+0x9): undefined reference to `cxl_driver_unregister' Prevent this with another depndency on the tristate symbol. Fixes: 09d09e04d2fc ("cxl/dax: Create dax devices for CXL RAM regions") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/dax/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > There is already a dependency on CXL_REGION, which depends on CXL_BUS, > but since CXL_REGION is a 'bool' symbol, it's possible to configure > DAX as built-in even though CXL itself is a loadable module: > > x86_64-linux-ld: drivers/dax/cxl.o: in function `cxl_dax_region_probe': > cxl.c:(.text+0xb): undefined reference to `to_cxl_dax_region' > x86_64-linux-ld: drivers/dax/cxl.o: in function `cxl_dax_region_driver_init': > cxl.c:(.init.text+0x10): undefined reference to `__cxl_driver_register' > x86_64-linux-ld: drivers/dax/cxl.o: in function `cxl_dax_region_driver_exit': > cxl.c:(.exit.text+0x9): undefined reference to `cxl_driver_unregister' > > Prevent this with another depndency on the tristate symbol. > > Fixes: 09d09e04d2fc ("cxl/dax: Create dax devices for CXL RAM regions") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- Looks good, thanks Arnd.
diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig index 8c67a24592e3..a88744244149 100644 --- a/drivers/dax/Kconfig +++ b/drivers/dax/Kconfig @@ -46,7 +46,7 @@ config DEV_DAX_HMEM config DEV_DAX_CXL tristate "CXL DAX: direct access to CXL RAM regions" - depends on CXL_REGION && DEV_DAX + depends on CXL_BUS && CXL_REGION && DEV_DAX default CXL_REGION && DEV_DAX help CXL RAM regions are either mapped by platform-firmware