Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4309824ybg; Mon, 8 Jun 2020 04:46:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzntPLiMsnAuGBhrpRKCfTjAZUsiRYiBV+CEbkM25fOMyx4c9+tBk+3KUg2hvDaJEGQ4lFV X-Received: by 2002:aa7:d64e:: with SMTP id v14mr10279114edr.103.1591616772517; Mon, 08 Jun 2020 04:46:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591616772; cv=none; d=google.com; s=arc-20160816; b=gn+uhZGUuii5CsUjZUXCePO4rfbAoMMwgxH2cXUTwqtnlqqd6pSNe+sR0uD2D8ij3m wNCUNW2FpzDBfM0m49KH1Ui6yl0RR2KDMEcLB4R6jfVeXY4rCs4Q/foxX2fgqW2iU1qO B/hiaW6qkDdAzHdikDpiuVPu0dQrJFhqU+W7D0jldVWSUJRp8D3bVICFEJo3eY8ERPsL N6auS/dxVQGi/EWcr+46VoBRbJkBkgbL8IenYh19Rh2ESJUe9ItfrXdcIFOOJe/rUvZq 7QSOoIQDyG/wrhq9meHZmIEJOo1wjIJQ5ntOKZxhQyBNpoIbxpaxRwThfqYh5YW2Bo1B 6Igw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=wEflf0C6Eyocs/rphck40RxemE3ssquR+KRGQzR4/sA=; b=K2rSyHr6R5KSn3PduTsL57NVmWcDM3L5yahqQujKYDFQZpcGEREp+wtGdvhVyKasw5 l/su/wO6toGzyGg2M0xJA9LOeJYlagPxoQ3x4Mo0n0m7x/sAqllej84w4+TOFiUqT1Bu SU4wdJME6FNxt+yeZU3Z/uQBTBTpFSmfLgAkUyg5EgnUmkpxnUEc5MlQtnYPSt8iS962 V1/uLSrUeOh8TzfVmLHmIhlPMGlHAKZF2MdrcD9WL35GEKgiYTNz8j79khyZzMh0YI0i RuLcWl8atgbHp8gcE0AFe4gpK+PpyEqxeEYaRJnr+R0OeJZ0WVyjN+JG0j1tub3ryQ+a 0FDA== ARC-Authentication-Results: i=1; mx.google.com; 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 hb13si8282517ejb.49.2020.06.08.04.45.49; Mon, 08 Jun 2020 04:46:12 -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; 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 S1729656AbgFHLlx (ORCPT + 99 others); Mon, 8 Jun 2020 07:41:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729648AbgFHLlw (ORCPT ); Mon, 8 Jun 2020 07:41:52 -0400 Received: from bmailout3.hostsharing.net (bmailout3.hostsharing.net [IPv6:2a01:4f8:150:2161:1:b009:f23e:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75210C08C5C2; Mon, 8 Jun 2020 04:41:51 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 04F81100A8787; Mon, 8 Jun 2020 13:41:49 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 99FFD43A8E1; Mon, 8 Jun 2020 13:41:48 +0200 (CEST) Date: Mon, 8 Jun 2020 13:41:48 +0200 From: Lukas Wunner To: Robin Murphy Cc: Florian Fainelli , Mark Brown , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Scott Branden , Ray Jui , linux-kernel@vger.kernel.org, "open list:SPI SUBSYSTEM" , Rob Herring , "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..." , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , Martin Sperl , Nicolas Saenz Julienne Subject: Re: [PATCH v2] spi: bcm2835: Enable shared interrupt support Message-ID: <20200608114148.4bau4mdcvwgf25ut@wunner.de> References: <20200604212819.715-1-f.fainelli@gmail.com> <142d48ae-2725-1368-3e11-658449662371@arm.com> <20200605132037.GF5413@sirena.org.uk> <2e371a32-fb52-03a2-82e4-5733d9f139cc@arm.com> <06342e88-e130-ad7a-9f97-94f09156f868@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 08, 2020 at 12:11:11PM +0100, Robin Murphy wrote: > And all in code that has at least one obvious inefficiency left on > the table either way. Care to submit a patch to overcome that inefficiency? > This thread truly epitomises Knuth's "premature optimisation" quote... ;) The thread came about because it can be determined at compile time whether the interrupt is going to be shared: On the BCM2835 (Raspberry Pi 1), CONFIG_ARCH_MULTI_V6 is set and this SoC doesn't have multiple bcm2835-spi instances, so no shared interrupt. The question is how to discern BCM2836/BCM2837 (Raspberry Pi 2/3), which do not have multiple instances, and BCM2711 (Raspberry Pi 4) which does. The Raspberry Pi Foundation compiles BCM2711 kernels with CONFIG_ARM_LPAE=y, but Florian considered that kludgy as a discriminator and opted for runtime-detection via the compatible string instead. If you've got a better idea please come forward. Is "optimize shared IRQ support away if IS_ENABLED(CONFIG_ARCH_MULTI_V6), else leave it in" the best we can do? Thanks, Lukas