From patchwork Mon Jul 3 11:29:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 115319 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp460009vqx; Mon, 3 Jul 2023 04:52:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4r4Ii3NssHk+XqztXm9/YZUgYK0S5CazyIeH0ALk99qlu41hZG2280tftVJzhyn1VNPMmc X-Received: by 2002:a05:6a21:3389:b0:123:3ec2:360d with SMTP id yy9-20020a056a21338900b001233ec2360dmr15662052pzb.5.1688385147077; Mon, 03 Jul 2023 04:52:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688385147; cv=none; d=google.com; s=arc-20160816; b=qreJO1OE2spOfrUtUYTc0AxQmu6Y2NFPKoDhBwSuSRjEPQLI3ICxeR5mqEcbQpf0Jg pJNl+TCIv9E67ORWch2yM8fhGlXpIP+nqXwhyPDTfcXuGRNWL4ciTr4IiXanfHEbqeOM cZc2t6dRnTYteSO0XFoyJD1yE4G6TEJan6I4aR02ciiZ8JK/iX2TZJ/TVIraWD6LdI+a GTq+TeEH4tgeCfOAaf/Dx1qLvbk4+yL5+0nbNShk/1KOjYAmtvDrfiGaWt44tOx7Vk5c 9niyExjX/izSDuOMH1tWgwM/gMg+urdPyleOKPRZVrKlb1tTk+8Kyaq1gQ3zc2AX7StZ dXMw== 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=LxbLC4pCx5I+QlaWn8SuA3YG5h1ELTElWRoLy13JZb4=; fh=vETBOQKXq+dHfTj2VxTzr8AI2imGZJz6RodZKF8ko5I=; b=heKsxbEl5OD5devf8szhloccKQ91BveGJe0nMZdqWvapS7UrojqNqEGCqE4aapdc0K whRBeoxrS0u8z8z3LhATIyRpM0fnab6Njp8XlhPBiaTI/7z2y4wloklCQUtXRKVwEqhP FDJaqhk+WdMcMjxh83Mci47Mt3ycc/19B8UvAzQt+tSb8fs3TDDuzbsxyXgzFpiseB3r PnKG8uZfVNHg5u5J1BTKtFE90BmgQetLSIKcPa6eKvPthsN+bs+GZkfwBdOb+zNN3i0w f+eFPOia/MwCktNcBbKGNu9gWo7LKkiugjFMJ2JuBxH6M5VX2/KTzl07NoBI4esCRRg0 VU5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nUMahLo3; 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 b12-20020aa78ecc000000b006826f351306si5275680pfr.222.2023.07.03.04.52.11; Mon, 03 Jul 2023 04:52:27 -0700 (PDT) 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=nUMahLo3; 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 S230331AbjGCL3k (ORCPT + 99 others); Mon, 3 Jul 2023 07:29:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230304AbjGCL3i (ORCPT ); Mon, 3 Jul 2023 07:29:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EE2FB3; Mon, 3 Jul 2023 04:29:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9AEE060EE0; Mon, 3 Jul 2023 11:29:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89434C433C7; Mon, 3 Jul 2023 11:29:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688383777; bh=d2wojFlzaictF79/C2eTIPrC5M/dnRiRjfUH/Mw1eoo=; h=From:To:Cc:Subject:Date:From; b=nUMahLo3r+VIBhhgw9EZM1lZPLtdrSjd5nL0oOxGjM2Jz6jszOesNV97kv1l7t+/v VoKda7YgnUEpyZrg9z9A0P85FktwcBN8nYW4pgeSL97Fs2CPCzkqr+ovp/EwvyU4mz N4AzVgEhAIErNjFKCnK6FvUUs786Cw1+m/AwIcJSn0e614iJSfHOBvwFRlKPkFLBko 8c8ifAKmo3gCEs1RDoN5JIBRH+tLTDTw5XNh9bKcw4UsUknkqF8RPP4zK2eMQpKBuK v8Y1YMqsn3Ojv52wSxQeXW24vXx+TFXLTGcIe2AoMZUlt31Veo5ppoPqI1F+7xXnih TEuddLZi8VTSg== From: Arnd Bergmann To: Alison Schofield , Vishal Verma , Ira Weiny , Ben Widawsky , Dan Williams , Jonathan Cameron , Dave Jiang Cc: Arnd Bergmann , Randy Dunlap , linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cxl: fix CONFIG_FW_LOADER dependency Date: Mon, 3 Jul 2023 13:29:13 +0200 Message-Id: <20230703112928.332321-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770400144061032862?= X-GMAIL-MSGID: =?utf-8?q?1770400144061032862?= From: Arnd Bergmann When FW_LOADER is disabled, cxl fails to link: arm-linux-gnueabi-ld: drivers/cxl/core/memdev.o: in function `cxl_memdev_setup_fw_upload': memdev.c:(.text+0x90e): undefined reference to `firmware_upload_register' memdev.c:(.text+0x93c): undefined reference to `firmware_upload_unregister' In order to use the firmware_upload_register() function, both FW_LOADER and FW_UPLOAD have to be enabled, which is a bit confusing. In addition, the dependency is on the wrong symbol, as the caller is part of the cxl_core.ko module, not the cxl_mem.ko module. Fixes: 9521875bbe005 ("cxl: add a firmware update mechanism using the sysfs firmware loader") Signed-off-by: Arnd Bergmann Reviewed-by: Dave Jiang Reviewed-by: Xiao Yang --- drivers/cxl/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cxl/Kconfig b/drivers/cxl/Kconfig index fcbf8295fde37..8ea1d340e4385 100644 --- a/drivers/cxl/Kconfig +++ b/drivers/cxl/Kconfig @@ -2,6 +2,8 @@ menuconfig CXL_BUS tristate "CXL (Compute Express Link) Devices Support" depends on PCI + select FW_LOADER + select FW_UPLOAD select PCI_DOE help CXL is a bus that is electrically compatible with PCI Express, but @@ -82,7 +84,6 @@ config CXL_PMEM config CXL_MEM tristate "CXL: Memory Expansion" depends on CXL_PCI - select FW_UPLOAD default CXL_BUS help The CXL.mem protocol allows a device to act as a provider of "System