Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2848393rwb; Fri, 2 Dec 2022 16:27:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf5sIG1oEHlxDn4nOhVFH/R6yueYtSolgjlxcugjwfp4bjoPs4oftU6srlUloWXpN6w0NlJe X-Received: by 2002:a05:6402:2912:b0:46a:c132:8a25 with SMTP id ee18-20020a056402291200b0046ac1328a25mr33547080edb.205.1670027221611; Fri, 02 Dec 2022 16:27:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670027221; cv=none; d=google.com; s=arc-20160816; b=R2KzkGhnUYyoDQHF59Fj0zfRWkabxVXGwOeFTipoTFXGy8RLWTQ7i+8MB895inZ285 8Mby+ab5jhdEYjSZeiHMRp5/cXVNmaUmo4ryNUEUZ2br0FKWAjrXEY2VBKsF0yj0zPHl di3VMzhzUVrbYcrGzkPIfSnv9FpctLpKCoYy6LEuNlhU52saRYZA11+7F9MsJXHtbxa5 H8Npty2uSYj5RRr0PkKeFAoSfUF7MgiUob+KZP/eloJLT7o/u4Ozpu27Y9xWHdKsJTYo /ME+2sSIko+znj9bg3YhTN+UQf4EfzwJ8TCjrP9yhluRhgUdu7XJfLYKz4iqyvNIMEe1 76sA== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=b/xqI7DzRkMySMnFhfWjGmd3zMiDWqlHCkYfRPYpuqY=; b=gtDJj8r4mmRO/HSwVmQKEE6NsKvyos83WbdPBLTcA1ntpIF1xUYPYhZs6q9HdPdNVq 4aasuMw3WB5XGM9IcDvsy1c6n1RaBYUBUuw+Idrbb/vy42zhEOnstY4D7CIXKKtyKYc6 l8eQtsjFMbCKun9dYA3wGjcJyD8JjjWpO9u50fapgFigs2LrqfjfmpcrivwzPUK5NQQ3 pWimZPJkfH7ybIRq/AihPMpz5ibdOrwUVmw9dCAg6kTB+Eon06ww70vX5xbIobOWw/Ds 2tvJbXgCJC8VaYgj2FtbFyGBY+4LGeZztq/aNJdKVZdpeJhSnY90J8rFKlf98rklmkXt t/jw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a508d05000000b004697dff9638si6621650eds.87.2022.12.02.16.26.40; Fri, 02 Dec 2022 16:27:01 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234701AbiLCAQn (ORCPT + 83 others); Fri, 2 Dec 2022 19:16:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234369AbiLCAQm (ORCPT ); Fri, 2 Dec 2022 19:16:42 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4EFA9D80E6; Fri, 2 Dec 2022 16:16:41 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B2D2423A; Fri, 2 Dec 2022 16:16:47 -0800 (PST) Received: from slackpad.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 299303F73B; Fri, 2 Dec 2022 16:16:39 -0800 (PST) Date: Sat, 3 Dec 2022 00:14:57 +0000 From: Andre Przywara To: Samuel Holland Cc: Chen-Yu Tsai , Jernej Skrabec , Michael Turquette , Stephen Boyd , Krzysztof Kozlowski , Philipp Zabel , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH 1/5] clk: sunxi-ng: Remove duplicate ARCH_SUNXI dependencies Message-ID: <20221203001439.64284671@slackpad.lan> In-Reply-To: <20221126191319.6404-2-samuel@sholland.org> References: <20221126191319.6404-1-samuel@sholland.org> <20221126191319.6404-2-samuel@sholland.org> Organization: Arm Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 On Sat, 26 Nov 2022 13:13:15 -0600 Samuel Holland wrote: Hi, thanks for addressing this! > SUNXI_CCU already depends on ARCH_SUNXI, so adding the dependency to > individual SoC drivers is redundant. > > Signed-off-by: Samuel Holland > --- > > drivers/clk/sunxi-ng/Kconfig | 43 ++++++++++++++++++------------------ > 1 file changed, 21 insertions(+), 22 deletions(-) > > diff --git a/drivers/clk/sunxi-ng/Kconfig b/drivers/clk/sunxi-ng/Kconfig > index 461537679c04..64cfa022e320 100644 > --- a/drivers/clk/sunxi-ng/Kconfig > +++ b/drivers/clk/sunxi-ng/Kconfig > @@ -14,43 +14,43 @@ config SUNIV_F1C100S_CCU > > config SUN20I_D1_CCU > tristate "Support for the Allwinner D1 CCU" > - default RISCV && ARCH_SUNXI > - depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST > + default RISCV > + depends on RISCV || COMPILE_TEST I agree on the "depends" part: Indeed the guard symbol already covers that, so it's redundant. However I am not so sure about the "default" part: When ARCH_SUNXI is deselected, but COMPILE_TEST in enabled, we default to every CCU driver being built-in. I am not sure this is the intention, or at least expected when doing compile testing? > > config SUN20I_D1_R_CCU > tristate "Support for the Allwinner D1 PRCM CCU" > - default RISCV && ARCH_SUNXI > - depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST > + default RISCV > + depends on RISCV || COMPILE_TEST > > config SUN50I_A64_CCU > tristate "Support for the Allwinner A64 CCU" > - default ARM64 && ARCH_SUNXI > - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST > + default ARM64 > + depends on ARM64 || COMPILE_TEST I wonder if this "depends" line was always wrong and should be fixed: We can compile a 32-bit ARM kernel and run it on an A64. Granted this requires a special bootloader or a hacked U-Boot (tried that), and reveals some other issues with the decompressor, but technically there is no 64-bit dependency in here. The same goes for all the other ARM64 CCUs: Cortex-A53s can run AArch32 in all exception levels. So shall we just completely remove the "depends" line for those, and let SUNXI_CCU do that job? Or use use !RISCV || COMPILE_TEST? Cheers, Andre > > config SUN50I_A100_CCU > tristate "Support for the Allwinner A100 CCU" > - default ARM64 && ARCH_SUNXI > - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST > + default ARM64 > + depends on ARM64 || COMPILE_TEST > > config SUN50I_A100_R_CCU > tristate "Support for the Allwinner A100 PRCM CCU" > - default ARM64 && ARCH_SUNXI > - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST > + default ARM64 > + depends on ARM64 || COMPILE_TEST > > config SUN50I_H6_CCU > tristate "Support for the Allwinner H6 CCU" > - default ARM64 && ARCH_SUNXI > - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST > + default ARM64 > + depends on ARM64 || COMPILE_TEST > > config SUN50I_H616_CCU > tristate "Support for the Allwinner H616 CCU" > - default ARM64 && ARCH_SUNXI > - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST > + default ARM64 > + depends on ARM64 || COMPILE_TEST > > config SUN50I_H6_R_CCU > tristate "Support for the Allwinner H6 and H616 PRCM CCU" > - default ARM64 && ARCH_SUNXI > - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST > + default ARM64 > + depends on ARM64 || COMPILE_TEST > > config SUN4I_A10_CCU > tristate "Support for the Allwinner A10/A20 CCU" > @@ -71,8 +71,7 @@ config SUN6I_A31_CCU > > config SUN6I_RTC_CCU > tristate "Support for the Allwinner H616/R329 RTC CCU" > - default ARCH_SUNXI > - depends on ARCH_SUNXI || COMPILE_TEST > + default y > > config SUN8I_A23_CCU > tristate "Support for the Allwinner A23 CCU" > @@ -91,8 +90,8 @@ config SUN8I_A83T_CCU > > config SUN8I_H3_CCU > tristate "Support for the Allwinner H3 CCU" > - default MACH_SUN8I || (ARM64 && ARCH_SUNXI) > - depends on MACH_SUN8I || (ARM64 && ARCH_SUNXI) || COMPILE_TEST > + default MACH_SUN8I || ARM64 > + depends on MACH_SUN8I || ARM64 || COMPILE_TEST > > config SUN8I_V3S_CCU > tristate "Support for the Allwinner V3s CCU" > @@ -101,7 +100,7 @@ config SUN8I_V3S_CCU > > config SUN8I_DE2_CCU > tristate "Support for the Allwinner SoCs DE2 CCU" > - default MACH_SUN8I || (ARM64 && ARCH_SUNXI) > + default MACH_SUN8I || ARM64 > > config SUN8I_R40_CCU > tristate "Support for the Allwinner R40 CCU" > @@ -115,6 +114,6 @@ config SUN9I_A80_CCU > > config SUN8I_R_CCU > tristate "Support for Allwinner SoCs' PRCM CCUs" > - default MACH_SUN8I || (ARCH_SUNXI && ARM64) > + default MACH_SUN8I || ARM64 > > endif