From patchwork Thu Feb 15 08:33:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 201261 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp253758dyb; Thu, 15 Feb 2024 00:41:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWgUwrmOvUJPmMwkrenrtSfWvpU0leJ4u7VgdCePV6DZiv2n2FLsxJ8V7uGp3nKNuFYA8NqYNWVq2vdYXCN7wtiUUGZdg== X-Google-Smtp-Source: AGHT+IGqJzOiJtgfyAVPOOI4488D6qtttNu3qZl0lRLPRck+Z7EhOzlIvppeSTS/awWoH7M85MgD X-Received: by 2002:a17:906:6c88:b0:a3d:6637:9d68 with SMTP id s8-20020a1709066c8800b00a3d66379d68mr746877ejr.1.1707986504983; Thu, 15 Feb 2024 00:41:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707986504; cv=pass; d=google.com; s=arc-20160816; b=ARr5wyu4uGxiyf/DGCVkoQ+LCH/gnnKPhoMZ1AfbnxfppqmzUpURMwlPh7QC+0ra6r QbtixSxDEL59g525ewkz2JFG51rBJN7RJYzjjT8sIht0927JAvYHvgLz6UP0GUtIYeOI G1xn2QN44pC8HSG9bG8vWaIck3fxydqIWCm72t4mZQUj36t4tbAV4JWJwXcPSCFuP9yn 5qWMSE+PIZ7Jb1z5sPI8hyDJPiCTeaENDPtYyTZZXV/dBdV0/1x0Mzpn5mcdedInIS4O smhFlWHiLGU9E7xmJbdeaJfgdmVnzhUNBcgAaK0KKyJsA59SGIEjOyTq5c6MXAoXdS2E Bb2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=20fKvpMpyHeWI+qAKVwa7XD7AyhTlEN6ItqflGG8xcQ=; fh=Z7Q7JevMumIucmAuNrLVpMoUW5kCs8jpyy9ha/xTdPk=; b=FnOEcP5bBJUzf5jNJpp1lq0rO+XlAAE7bpUghn1ykkXWYdXbs3wGAUO39QvCq9Xz28 /ZA8MctITNSi/d7TeNUCowEnW/BhkNkK2XTxbZjZRg6X2GcQjlM1wZnJA0nM31mjKkag wtDHA2XcPBLMUpYGCaEMkrovPbmJmiXN+eaWg0HTLwkcqelqFqiAYz19Jxdn4uOf3Q8g QwPzSzl8HuiXFOQkjA65W3vMMhHftHdhfgwcFsNzpkauc4009hA9TR4ivxPmd1F0oi1i 6lG3pJh9WIJohexnCOeF4CqpQA66HLAfW0FNYYdMEW5Z+7WunhqMpIwmTpPvtNZ1FNQ3 0BTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Lhw7ewat; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-66422-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66422-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l7-20020a1709065a8700b00a3d5b894df1si429245ejq.513.2024.02.15.00.41.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 00:41:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66422-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Lhw7ewat; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-66422-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66422-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8BCCA1F2DA1E for ; Thu, 15 Feb 2024 08:33:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8EB1913AC8; Thu, 15 Feb 2024 08:33:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Lhw7ewat" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13A73171A7; Thu, 15 Feb 2024 08:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707986009; cv=none; b=EHWJsIjUs19zMUjMpDGObuZqDvkfbnbmmeANdn7DrBfvn39EtPyzAEqrrkq+8pUjJ7yH08/l4LJ2b6URrR1rHIQ57kG3D0BaO1lvo1ZiaMpSre+flH5Ssp2FdcGigrS5Tg3+CUbkc3OLKEx/r1DYNX9GtYa9BMF5pEyIgTOET3g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707986009; c=relaxed/simple; bh=ATjsM1v1rtS8D/Phyv7flUsDtfA5NO7irfbWAKzdNXs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=e8Xl5ZLYzht9vGiM7qfPHaSrMDZQmTr++bdHtJ3lqJxgvCAKWhOhWqgVO1828FB0IqVMKMXrzPThx4IDdx7ATLHOPmIoh1s8JxdUwU5YxSL8D4S3KCNYi+yS3mjvplxrJTWAiXmx/lmT4eBSewIfInqJyuxDz4Trjx/kaW9bhDk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Lhw7ewat; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30A97C433F1; Thu, 15 Feb 2024 08:33:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707986008; bh=ATjsM1v1rtS8D/Phyv7flUsDtfA5NO7irfbWAKzdNXs=; h=From:To:Cc:Subject:Date:From; b=Lhw7ewatBIg8dmBvwogTtKZnJQY2QT/5QEdoQ/yUTf7x1G2+OroRp6XUj4dhwmRrO RT9pjrBxbsN3tYav+1VUtOqAWIgjZWbmfRaPIiQ32J9J1Xda5X2bwLuG92bcFcW27o Js4TXZekrA49gXaYuwqlyFXx0/8E8LPaiY1ufYNuDNKzVNWQ8IMRtT0zmUPqfnYroA lZdkESi/UVMm5pqf+VePcLfh9+BCl14xoXuKtxajN8jcaRxtd2KK748eSQDuW/Nn8G 4ACJTzjqMgaUwBEpzBvBg1ai/xDP4BDuolhh6Ar9Wk52rdhnk1N3xdRO0nSqOpRiXI wXzJdxmk7Py6A== From: Arnd Bergmann To: "Rafael J. Wysocki" , Viresh Kumar , Manivannan Sadhasivam , Xiu Jianfeng Cc: Arnd Bergmann , Alexander Stein , Jingyu Wang , Florian Fainelli , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cpufreq: qcom-hw: add CONFIG_COMMON_CLK dependency Date: Thu, 15 Feb 2024 09:33:14 +0100 Message-Id: <20240215083322.4002782-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790953489615553893 X-GMAIL-MSGID: 1790953657345316217 From: Arnd Bergmann It is still possible to compile-test a kernel without CONFIG_COMMON_CLK for some ancient ARM boards or other architectures, but this causes a link failure in the qcom-cpufreq-hw driver: ERROR: modpost: "devm_clk_hw_register" [drivers/cpufreq/qcom-cpufreq-hw.ko] undefined! ERROR: modpost: "devm_of_clk_add_hw_provider" [drivers/cpufreq/qcom-cpufreq-hw.ko] undefined! ERROR: modpost: "of_clk_hw_onecell_get" [drivers/cpufreq/qcom-cpufreq-hw.ko] undefined! Add a Kconfig dependency here to make sure this always work. Apparently this bug has been in the kernel for a while without me running into it on randconfig builds as COMMON_CLK is almost always enabled. I have cross-checked by building an allmodconfig kernel with COMMON_CLK disabled, which showed no other driver having this problem. Fixes: 4370232c727b ("cpufreq: qcom-hw: Add CPU clock provider support") Signed-off-by: Arnd Bergmann --- drivers/cpufreq/Kconfig.arm | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index f911606897b8..a0ebad77666e 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -173,6 +173,7 @@ config ARM_QCOM_CPUFREQ_NVMEM config ARM_QCOM_CPUFREQ_HW tristate "QCOM CPUFreq HW driver" depends on ARCH_QCOM || COMPILE_TEST + depends on COMMON_CLK help Support for the CPUFreq HW driver. Some QCOM chipsets have a HW engine to offload the steps