Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2146919ybg; Fri, 5 Jun 2020 06:49:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJM4n8P9a33GiHiwFEn31qAm22BvjosdeSsqmBBXlVZ4AWS+pJYnpF3c9FjdTQFPpetVTK X-Received: by 2002:a17:906:c831:: with SMTP id dd17mr5080418ejb.40.1591364957275; Fri, 05 Jun 2020 06:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591364957; cv=none; d=google.com; s=arc-20160816; b=sA5Kc/v/HsYtq3xf0VQZT+xtxqrA6+4vWrF90FAPDnG9l9MbSqxsrFhXS2IZczqle+ GPjWxHhmlWzurxs8vjo4EKYwak1cQJMi8xbenkGkQHVEUgPLzMlmWfpmZwczVA0uPFL3 0nls76yZ3xhtVJwHfgk419UsUjOaMK7G1BJk/H9fp4y9HGM/tgnstt7H5hv7YWteUA5I p+3okha9RvoQaHKCmWH7sq7H3wJg61f98avFe6xUxcm1zk+Pg/3ObyY3nllajHkKdbzI Otv9v18Y0ejJf8QwU4M7C9MqAUC8i77R15HOq5jyqT4XB4nFTbeb34WEFyRATpGpdmdG rFXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=lqF48gYmD99LZzkjmeu4rjwNhVxaiWoWEObIVLOUgxM=; b=hXSanvrCot5rex4BI5Z27LI/EQf+PaD8q35mEacQv8QwlJVJ/r5yAhs/9Gt+/F3pSS Pksnsg5rs9AHKESK8Z8cDOhzl80f8JMdQy/wPSZCFJjPzvbYmCTL8LZLViFw3zSFr1HG yo7UTXRZIFk2D/yLqW2eMtvhPuUlfkjjeSivp1MUj46gL4I0mNl5XRrky+nSJrsvB+1S JhujqSA/bOgMuzUHr3fL5RGDulIE8tSpQstECDqyiDbRyUYpxycH+BUd/8/ncbB4yVmK 87M0V0LNO1Cb414JkqjcX3ffJW2C6o2yEpRyatckEfGTol5CjVzDrFsdoYVqzMpzzbAZ M6QA== 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 cc23si4131914edb.115.2020.06.05.06.48.53; Fri, 05 Jun 2020 06:49:17 -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 S1727032AbgFENq5 (ORCPT + 99 others); Fri, 5 Jun 2020 09:46:57 -0400 Received: from foss.arm.com ([217.140.110.172]:56078 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726553AbgFENq5 (ORCPT ); Fri, 5 Jun 2020 09:46:57 -0400 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 4E77131B; Fri, 5 Jun 2020 06:46:56 -0700 (PDT) Received: from [10.57.10.23] (unknown [10.57.10.23]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0E0C83F305; Fri, 5 Jun 2020 06:46:53 -0700 (PDT) Subject: Re: [PATCH v2] spi: bcm2835: Enable shared interrupt support To: Mark Brown Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Florian Fainelli , Scott Branden , Ray Jui , linux-kernel@vger.kernel.org, Rob Herring , "open list:SPI SUBSYSTEM" , Nicolas Saenz Julienne , lukas@wunner.de, "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..." , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , Martin Sperl , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" References: <20200604212819.715-1-f.fainelli@gmail.com> <142d48ae-2725-1368-3e11-658449662371@arm.com> <20200605132037.GF5413@sirena.org.uk> From: Robin Murphy Message-ID: <2e371a32-fb52-03a2-82e4-5733d9f139cc@arm.com> Date: Fri, 5 Jun 2020 14:46:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200605132037.GF5413@sirena.org.uk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-06-05 14:20, Mark Brown wrote: > On Fri, Jun 05, 2020 at 12:34:36PM +0100, Robin Murphy wrote: >> On 2020-06-04 22:28, Florian Fainelli wrote: > >>> For the BCM2835 case which is deemed performance critical, we would like >>> to continue using an interrupt handler which does not have the extra >>> comparison on BCM2835_SPI_CS_INTR. > >> FWIW, if I'm reading the patch correctly, then with sensible codegen that >> "overhead" should amount to a bit test on a live register plus a not-taken >> conditional branch - according to the 1176 TRM that should add up to a >> whopping 2 cycles. If that's really significant then I'd have to wonder >> whether you want to be at the mercy of the whole generic IRQ stack at all, >> and should perhaps consider using FIQ instead. > > Yes, and indeed the compiler does seem to manage that. It *is* non-zero > overhead though. True, but so's the existing level of pointer-chasing indirection that with some straightforward refactoring could be taken right out of the critical path and confined to just the conditional complete() call. That's the kind of thing leaving me unconvinced that this is code where every single cycle counts ;) Robin.