Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2220817ybg; Fri, 5 Jun 2020 08:30:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7ne3amsgNt6yEmEwbb5lEnZF9e/o6x5PEWjI8QfZj6EQcKWNqr0vr8rYrxdLI2RHtPb4r X-Received: by 2002:aa7:c15a:: with SMTP id r26mr9357871edp.21.1591371008929; Fri, 05 Jun 2020 08:30:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591371008; cv=none; d=google.com; s=arc-20160816; b=T4ynYJvfSdIEkfZNjtJB8rK+l+W6mxRbEoQrvd2jSziiJxJ944IZXJ0sN4WO01omeg kBxctT6d+eNQhXZBn/UA/Yjj8QHmgo0MRCWtgB7LXUBigDC3punmeORcFfc2UnBGzFs8 6MXN76l0XGBa90YN71Cl+MLXTV67VOZcRZlp1qPm3wsbQGhBaVgOPsEhS08cxheJPOdW 93cBlEekPSOB40s3I1z421No4kZizaOkaKeCrha5Cv+oF89YeOS1NN1Cm7d6Sv1TBe04 tpH2/fJRDXr9trl7C5Ovkhj2dfquYge/q0ogPl22e+wfzCEzp+yVAYNPQslu/1OAoToa tZVg== 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:dkim-signature; bh=cwE6lN0oRc3R/lRo7XRlwrgGSlMb3orxHCcOBwJlZXA=; b=bH0LdxPruMoSOSRN5EV4GfKr5aC1VA7ch9eD3h2tOkGFjNI67wQvk7ms+ccBwFZVu4 aqxfDmrBaiZJ6xRQ5GHLBxIuD7CHrwVt/6LYk/4b8qPkF5T+t4ZFT/rwoqXjwW/xDLYS LXrc7LTXkwcwKRAl2eK+N/i9K0UcixtyJkBfvjSA3bKvVPqm+8q+iUeaA2u9BBcyJtIV bMNaF4U4HzDL/g0qGBOt6NoSPcy9n7sTjSkBwRS7dhWP2M4dbPcRvvs9yPQcUTnErQsi v2LBefYcs8XSnAoZpCGhT6TdUFzxbFEBokDCWJxwes7Kxy/fYJN5BHeg0LS9FP091XTt GOcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q5Jmn118; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d3si3801917ejc.374.2020.06.05.08.29.46; Fri, 05 Jun 2020 08:30:08 -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=@kernel.org header.s=default header.b=q5Jmn118; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727798AbgFEP1m (ORCPT + 99 others); Fri, 5 Jun 2020 11:27:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:57314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726539AbgFEP1m (ORCPT ); Fri, 5 Jun 2020 11:27:42 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E7F722075B; Fri, 5 Jun 2020 15:27:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591370861; bh=cwE6lN0oRc3R/lRo7XRlwrgGSlMb3orxHCcOBwJlZXA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q5Jmn118NsrWlHCB8CdqciMyPXagQuykia3JVFkCcJCzYTmb1v3C3l6d+WqCBuuxg X2D0lPfLpPM/iw1FJuKwWoyG8o5jVxndq+h3q1ezTpdrSa4BM+BkILAyqPPcR3NN9X 0xR/4sbzqBqkW8UAQT5sfhnTNG3o1kdFnjP9RbwA= Date: Fri, 5 Jun 2020 16:27:39 +0100 From: Mark Brown To: Robin Murphy Cc: "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Florian Fainelli , Scott Branden , lukas@wunner.de, 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: <20200605152739.GH5413@sirena.org.uk> 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: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AqCDj3hiknadvR6t" Content-Disposition: inline In-Reply-To: <06342e88-e130-ad7a-9f97-94f09156f868@arm.com> X-Cookie: Air is water with holes in it. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --AqCDj3hiknadvR6t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jun 05, 2020 at 03:41:27PM +0100, Robin Murphy wrote: > Ha, and in fact having checked a build out of curiosity, this patch as-is > actually stands to make things considerably worse. At least with GCC 8.3 and > bcm2835_defconfig, bcm2835_spi_interrupt_common() doesn't get inlined, which > means bcm2835_spi_interrupt() pushes/pops a stack frame and makes an > out-of-line call to bcm2835_spi_interrupt_common(), resulting in massively > *more* work than the extra two instructions of simply inlining the test. Whichever compiler I was using (clang-11 probably) did manage to inline the tail call so it really was the two instructions but yeah, in general this approach is going to be fragile. > So yes, the overhead of inlining the test vs. the alternative is indeed > non-zero. It's just also negative :D And variable! --AqCDj3hiknadvR6t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl7aZGoACgkQJNaLcl1U h9AX6gf7Bm5ytifNBvydJuvs4NzgM67Urhjfzt+XzOq9aPGD/YyTV42HNCmGAqGy SK5nGgR0rYbNixHVpe8BR8sR7ouoD+RplUaa6HByo8h538lDdtImQw5mxOM7jSqj YqJQrm1hwA4Exl+b3ko3Ec3LfHP8Z+IPS0pbuhibX42asNbhDsUc7dKMVGOPsA0m M06K9koGLwc5XEs7+4ylBVfqhTKIQSiHeg8K1TJ3VQEFBqOCBoURI0TLPUPo3PYV vg5NvWtlPqYwBj/gWm4+jdTPM2Ru10LTa+jU3KnroOtJSBil2tErrvKb31iWGgS5 ECVrLTGILzwbt5Gq0ojVE1LsJVSmqg== =/uNB -----END PGP SIGNATURE----- --AqCDj3hiknadvR6t--