From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 68036C3DA5D for ; Mon, 15 Jul 2024 11:06:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=H1grea9CGZ4/RCpR8w1W/S6WqTVig2P2g26FTdH9FQQ=; b=2VYBKxq7Hnlj/0LQOH43Lg+rzi b96nwjMQ5DB19BPvVLDuNWz1dAJFOkECuQq15YNnMs5ZevZuyzRhSoKkPZwu5P/UYH2T3EAXVJgen d28F2SwUy7mdh0RKey/S44HCligsdgoDorThvuinmQ366AQrxvzWLpdJbqZSWKwHO0Ar/RWDNVboe ajkoEYuHO0Srl4KMiQ5s5AI6WlOx4lnB/D6XQO2Wtrro1BJISdee1bQLaNaylDSkUONuXbyUSOwJZ xbrf8L4XClbHAXkJFgzvru1/wCqno/HtBR2qrpJ0+m/T18BlxfO7yBdPi72ZM+S3lAMZOZ/zoGluz 2AkjxejQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTJXT-00000006otm-271F; Mon, 15 Jul 2024 11:06:39 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTJX9-00000006opn-25LS for linux-arm-kernel@lists.infradead.org; Mon, 15 Jul 2024 11:06:21 +0000 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 8F013DA7; Mon, 15 Jul 2024 04:06:43 -0700 (PDT) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 040E23F766; Mon, 15 Jul 2024 04:06:16 -0700 (PDT) Date: Mon, 15 Jul 2024 12:06:14 +0100 From: Mark Rutland To: Daniel Lezcano Cc: Mark Brown , Thomas Gleixner , David Abdurachmanov , Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ross Burton Subject: Re: [PATCH v2] clocksource: sp804: Make user selectable Message-ID: References: <20240529-arm64-vexpress-sp804-v2-1-c542a80af33a@kernel.org> <2b946a68-dcdd-4a1e-b7c3-416725033c2e@linaro.org> <11c5de84-21f0-45de-81e0-dc765a391123@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <11c5de84-21f0-45de-81e0-dc765a391123@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240715_040619_601887_4B56F50D X-CRM114-Status: GOOD ( 31.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jul 09, 2024 at 06:15:40PM +0200, Daniel Lezcano wrote: > On 08/07/2024 19:44, Mark Brown wrote: > > On Mon, Jul 08, 2024 at 06:49:38PM +0200, Daniel Lezcano wrote: > > > On 29/05/2024 21:48, Mark Brown wrote: > > > > > > The sp804 is currently only user selectable if COMPILE_TEST, this was > > > > done by commit dfc82faad725 ("clocksource/drivers/sp804: Add > > > > COMPILE_TEST to CONFIG_ARM_TIMER_SP804") in order to avoid it being > > > > spuriously offered on platforms that won't have the hardware since it's > > > > generally only seen on Arm based platforms. This config is overly > > > > restrictive, while platforms that rely on the SP804 do select it in > > > > their Kconfig there are others such as the Arm fast models which have a > > > > SP804 available but currently unused by Linux. Relax the dependency to > > > > allow it to be user selectable on arm and arm64 to avoid surprises and > > > > in case someone comes up with a use for extra timer hardware. > > > > > Would it make sense to add the option in the platform so it selects the > > > timer ? > > > > As the commit log says far as I'm aware all the platforms that rely on > > the sp804 timer already select it (they wouldn't otherwise be able to > > work unless COMPILE_TEST was enabled). The Arm models and possibly > > other platforms have the sp804 but it will currently be ignored by Linux > > and the architected timers used instead so it would be wasteful to force > > it on for them. > > The policy of the Kconfig is we should keep the option silent. Why? I can understand hiding an option when it *really* depends on something that isn't available, but the kernel not having knowledge of a specific soc/platform isn't the same thing -- it's an entirely synthetic dependency. What problem is solved by not allowing the user to select this? > My suggestion was to provide the option in the platforms Kconfig and > [un]select the ARM_TIMER_SP804 from there As above, that means that the kernel needs to have knowledge of the specific platform, which in general we've been moving *away* form (e.g. with DT and ACPI tables). For virtial platformas specifically that's a massive pain because they're *so* configurable -- there's not much the kernel can rely on being present/absent, and users will want to enable specific features depending on what they're trying to test, at which point they'd have to hack Kconfig files... Mark. > > > -- > Linaro.org │ Open source software for ARM SoCs > > Follow Linaro: Facebook | > Twitter | > Blog > >