Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2341973pxb; Sat, 2 Oct 2021 14:06:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySywhhR+s8wCXH8FiFbrr9CtcJBWzX5DgeWcpDT9xtY9Z5uSgoFAowDZM3+usgGGJUFLtJ X-Received: by 2002:a17:90a:8597:: with SMTP id m23mr18694769pjn.103.1633208816514; Sat, 02 Oct 2021 14:06:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633208816; cv=none; d=google.com; s=arc-20160816; b=moF4QUSYUX7t5pUcrePSE6kR3wQJ+U1tww6DNrluOiZ0E/opFO4NU5j0FY/XZxpOzn M9VYuce2Xjm8HLu9W92ks0XmEry2jhYG1JZqaDyijUvUAjgke9zIEROubWD+hr/1kiYl RP3P1YSlhud5uwLALO45SnYU3Zhh6kHgjNGA9BjVwNMsiHbic7tMpISRbH9h53jAPvPj wMWluFCIrs9qojETeCSu6n+afVlgGOta4zG2RWCB3/JSNrjyd1XLoCoRUV2mpHvfNNJ9 oaWyk4SdtPlVW+8bUqR5fW2rNKgacYzhCBQ8jVNPfi5/LycmumyuY3+RVjV9770HmJMN GzUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=f7kGYU9i8iehxQ7ed0jxcX484pBLuV+nP2UpT0YHga0=; b=G0BMGAaLoU+c0CFeqGd5iY+4Dzh8q3nizc28G1K8sSvv8Q5GqhTpyfuTm++uEwvT11 D2JMVdQ1fCPM21yZi//agUlLwT1zIzZuW8fkHlgp7tIJg+g4t8q50xNZVklwDRTe+/vU /g8hYhh0HmEPMLqTXTz4aEGEAKpjHLFR62HLkcrYMbjRZo22007wIHE5Kq8pdHTS39g8 feE0h4q0t1cR0QutrRU9F78XN+UXUB3q/3FgEvqKpQwCgKSD8AhEzpw/uZpTsdsNmWRM Es400vwKwWyUIPQT0PTZYAuRl99/YdvJkqIN1o3ou7nbvVg142QwnjYieXv0u5kKEpL0 9lzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lixom-net.20210112.gappssmtp.com header.s=20210112 header.b=KCFo1XEy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kb1si10640680pjb.39.2021.10.02.14.06.44; Sat, 02 Oct 2021 14:06:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lixom-net.20210112.gappssmtp.com header.s=20210112 header.b=KCFo1XEy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232312AbhJBVFA (ORCPT + 99 others); Sat, 2 Oct 2021 17:05:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234021AbhJBVE7 (ORCPT ); Sat, 2 Oct 2021 17:04:59 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6902C061714 for ; Sat, 2 Oct 2021 14:03:12 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id s16so11108842pfk.0 for ; Sat, 02 Oct 2021 14:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lixom-net.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=f7kGYU9i8iehxQ7ed0jxcX484pBLuV+nP2UpT0YHga0=; b=KCFo1XEywDIaVfsHl65LLQZLhInq0HBpq3+oWSErEM00ItsX5IHl+xXjsw30f5qNfY GcJPfDhslBinoV++447QA+WNp9oVKL7+UjxlR2Pj+mPLnS+/l/jt+r0XEpvWam0MWV7b K+enVYzKefruDJIA3vIq2R5OCTWMbBL9aX626+JXAQ9ZrL4vl2/Lagt2QU5iaWlkxM08 xcuyL7xPiIxL74Mvp36cToiPtTIQgfPY7bGXJeo1oziAMObwXHIyYZy06bFc/T2TFmrH Fyrl4AkwSpuPBIAzGiwICybIH/KuXgmFZfW4DOWGun16Bjb6knwM/KAf5cpdvnXXzL8u cbCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=f7kGYU9i8iehxQ7ed0jxcX484pBLuV+nP2UpT0YHga0=; b=qDgsZqepU+U56/jskRSfnWu7UtV4Te5ZJAh4LCl7TNzU4TVRRrB3/oXstpYDyuMYXe Qj7kv6JnHJYJ4p5K+6MiY6gZRnbcrhMrjaHwpILPW463iyjxeXZH0c/5XkzSjjKKC0A8 NLOs2nFuzDbDkGXZ1TaBmK9ThUZp1JloKpSN9vmClkJ0Dw+Cr5VKOgVfkqCwsOvk1v7B sa6BSC+oYm3LHkR8uwUxDkM+401O+gWWTqgNu6Pc9In2OS2sNo32PowqtvGyG2f14ceC LDiLW/vFsbOAg+8824wtVSYfmZa5CMJXytcSV+AM2rg/7chVqh5YhJs6kNnmJM9Mn5qN iPdQ== X-Gm-Message-State: AOAM533V/JvB6l05MC5ZNIWHhj/Sdxs4NDaKYmwqZhssgKHPj6QnpUrC oGM5dQhkkRvWGLH5USrWOOFAEZmvhPFgsSlDNdbJBw== X-Received: by 2002:aa7:959a:0:b0:43b:adeb:ef58 with SMTP id z26-20020aa7959a000000b0043badebef58mr16909160pfj.19.1633208592223; Sat, 02 Oct 2021 14:03:12 -0700 (PDT) MIME-Version: 1.0 References: <20210928235635.1348330-1-willmcvicker@google.com> <7766faf8-2dd1-6525-3b9a-8ba790c29cff@canonical.com> In-Reply-To: From: Olof Johansson Date: Sat, 2 Oct 2021 14:03:00 -0700 Message-ID: Subject: Re: [PATCH v2 00/12] arm64: Kconfig: Update ARCH_EXYNOS select configs To: Saravana Kannan Cc: Arnd Bergmann , Geert Uytterhoeven , Will McVicker , Krzysztof Kozlowski , Russell King , Catalin Marinas , Will Deacon , Michael Turquette , Stephen Boyd , Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , Linus Walleij , Alessandro Zummo , Alexandre Belloni , John Stultz , Thomas Gleixner , Lee Jones , "Cc: Android Kernel" , Linux ARM , Linux Kernel Mailing List , linux-samsung-soc , linux-clk , "open list:GPIO SUBSYSTEM" , linux-rtc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 1, 2021 at 12:26 PM Saravana Kannan wrote: > > On Fri, Oct 1, 2021 at 8:27 AM Olof Johansson wrote: > > > > On Fri, Oct 1, 2021 at 2:01 AM Arnd Bergmann wrote: > > > > > > On Fri, Oct 1, 2021 at 10:19 AM Geert Uytterhoeven wrote: > > > > On Fri, Oct 1, 2021 at 7:24 AM Saravana Kannan wrote: > > > > > GIC and arch timer. Basically the minimal kernel would need a timer > > > > > for the scheduler tick and IRQ controller to get the timer IRQ and the > > > > > fixed clock driver if the archtimer uses one to get its frequency and > > > > > the early UART console is pointless as a module (so build it in to > > > > > allow debugging/development). > > > > > > > > > > And then all new drivers, we should make sure are implemented as > > > > > tristate drivers. And we can go back and slowly work on converting > > > > > existing drivers to modules (community effort -- not one person or > > > > > entity) -- at least the ones where the author has hardware or ones > > > > > where the change is very likely to be correct and someone else is > > > > > willing to test it. We'll never be able to support some/all ARM32 (do > > > > > they even have a GIC/arch timer standard?), but at least for ARM64, > > > > > this seems like a viable goal. > > > > > > > > Cortex-A7/A15 and later have GIC and architectured timer, so it should > > > > work for contemporary systems. > > > > Cortex-A9 systems may have GIC, and TWD and/or Global Timer (but I've > > > > seen SoCs where the interrupt for the latter was not wired :-(. > > > > > > There are a number of well-known examples even with 64-bit chips or > > > Cortex-A7/A15 based SoCs that can't use the architected timer, > > > irqchip or iommu. > > > > > > Apple M1, Broadcom BCM283x, Samsung Exynos5 and > > > some Hisilicon server parts come to mind, I'm sure there > > > are more. > > > > There's also more and more movement towards having coprocessors with > > standardized interfaces dealing with this functionality. We're > > currently at the point where they have coprocessors with > > non-standardized interfaces, and it's useful to keep encouraging > > convergence in this area to everybody's benefit. I don't find it > > particularly useful to make life easier for the custom solutions at > > the expense of others like this patchset does, when that's (just > > beyond? on?) the horizon. > > > > > > What are the plans for other architectures? > > > > I've seen similar patches being applied for e.g. MIPS. > > > > > > There is some work in the more actively maintained MIPS > > > platforms to make those behave more like Arm/powerpc/riscv/m68k > > > platforms, using a single image and moving drivers into modules. > > > Most MIPS platforms seem unlikely to get updated to this, > > > and will continue to require a SoC specific kernel binary forever, > > > similar to the renesas superh platforms. Most of the less > > > common architectures (arc, csky, hexagon, nios2, xtensa, > > > microblaze, nds32, openrisc, sparc/leon) are way behind that > > > though, and generally don't work at all without out-of-tree > > > code. > > > > One of the arguments for needing some of these core drivers in-kernel > > is that some platforms boot at very conservative DVFS operating > > points, to a degree that you really want to turn up the CPU clocks > > fairly early during boot. > > > > If you don't have the drivers built-in, you can't do that and/or you > > create possible fragile or awkward inter-module dependencies with > > deferred probing, etc. We do care about boot time enough to prefer to > > just build them in for this reason. > > Go look at a Pixel 5, we got this working just fine with all these > drivers as modules and we definitely care about boot time. You just > need to load your CPU freq driver and the other ones it needs early > on. And with fw_devlink=on (default in upstream), there's hardly any > deferred probing. Unfortunately these problems are usually easier to fix on new platforms, especially during new product development. The hard part is making sure you haven't regressed any of the legacy platforms when you're changing the implementation for them as well. > > If vmlinux binary size is a concern, maybe it's time to consider > > splitting the drivers into a bare-minimum piece that's not a module > > for early setup, and the rest that can be loaded post-boot. > > Isn't this literally what I was suggesting with my > ARM64_MINIMAL_GENERIC_KERNEL suggestion? Build in all the bare minimum > drivers that are needed before module loading can happen? You'd just > select them all under that config. And any existing platform that > wants to use it would break up their drivers into modules and switch > to it. Do you understand the implications of your proposal on the complexity for those who care about making sure different config combinations keep building and working, i.e. both the minimal-generic-kernel and the regular generic version? You've doubled the testing workload for all of those folks. It's a different mindset from when you mostly need to care about your one config and platform. -Olof