Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5620472pxb; Tue, 16 Feb 2021 03:23:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzitqO8jIBOjs3HaNmrcDnKEMc49/KCqnbtlcuV89pWaZ8CoC6FZAevm6rb0bSFiJgeuXiD X-Received: by 2002:a50:fe02:: with SMTP id f2mr329435edt.173.1613474622577; Tue, 16 Feb 2021 03:23:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613474622; cv=none; d=google.com; s=arc-20160816; b=GVMvowxpT9VGGC3rN5Cv8+ALKhBDCFJUKR8wMZygSyCXIsYVlgWg8tPflJoSPWYlnH KzbR8/OVk9lZoF6nuVflRjtKQenyRL7pA/Lrjrf8p9YEYQyyqwfV3VjxTBJaqCadRQRB ykdiG+LObxxLr25jouEpTsl2dQh0u8C0qkRyWuB1SDkIDSxaWToEphTHToj1xRtR9iPH vnyr61YEXADTz/00xw5surphz3llEVmCAaAtMnc0MgjDZOvF4+KmwVDHPXW7zOP07Rrm jXZ7O/LeTJc0rwaoHBHKdVGEvcybSEIIQmpubLA0clYjP7bhtBzz6ol9qTvassFBlzRE I2Uw== 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=zVDDiArooLIJxdLcYrvmUFExWfRmqDZ361SoH8wGG7o=; b=VPO8Z5KnvH9MLRALX2/P9ZJuJF5z5IYNogU/VMTmnmiUocUeZx8C8GXZLyKxF1LyHK 8FAxpO/LMybPb9u5L3FYHLaHQsND0x37Pz71k/ZMUE3qmVdmOyR+3uwQ5+iSxkQEo1DK woRdgRypyRwCWl4oYEWqFLL1NO/6VSw2ZcTxwChG8DhRnE1Z3x7YDRzI76NjPtOKq42o d7zbFJ0n7+JmCpwCbdWEmyfz4AedEfkcuqFATd+/qHBU39BsUkGMGDPZvOixsZ18mocz nZJ6vmm1WY6UPSRieB2KXlQm+vLLrltsb00TN+qW0wwL90Zm4U9idHsXoSI/AEhrwFbT ePsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TQYHRnVe; 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 z4si7283979ede.170.2021.02.16.03.23.20; Tue, 16 Feb 2021 03:23:42 -0800 (PST) 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=k20201202 header.b=TQYHRnVe; 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 S230049AbhBPLWX (ORCPT + 99 others); Tue, 16 Feb 2021 06:22:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:38414 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229807AbhBPLWD (ORCPT ); Tue, 16 Feb 2021 06:22:03 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 586E964DEC; Tue, 16 Feb 2021 11:21:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613474482; bh=sGdysOLwQ/vMTi6/cVtKA8MKh2ozaYEspwLLEkybZGg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TQYHRnVe7JndLjnuQU4eFOkLPlP7JYk78oQVaYcBjR7RNODDjKJyeAIgF5ahXUirA ApKGzblkY79ikREmqs8iyMl5FJEsBZkoQJI62CSiLMinyqqYqMUQraS/A7jVm5TiLZ lLyCWLoGhmOyF8Nexwqc+Cpwhb559ectSEdXwKP2wpjhIn2pFuct0MbkSdSHl04uKX FJoXYjyJK+sSFBYdOzMVMwTRfWDS02gjazD8cGT3yDjG2Xtkt+BDZJRO+uiawXmPrf 3p4GIPNtBfuKs8MH3x3iEi4FEJZ5QYx2rjSYOI/vm6rqOGhB4aywkDNYne18WUPFk5 b23sB6xz2QV5w== Received: by mail-ot1-f51.google.com with SMTP id c16so8720140otp.0; Tue, 16 Feb 2021 03:21:22 -0800 (PST) X-Gm-Message-State: AOAM530Y/CQy5G7fcilvMPQUGhWYYyz77PvQ71TKJcu5fB38IJ4zIWoy Jn5CWsEBFYettoogq4kvR0admroSvVM7U2CzOcc= X-Received: by 2002:a05:6830:18e6:: with SMTP id d6mr15005260otf.251.1613474481601; Tue, 16 Feb 2021 03:21:21 -0800 (PST) MIME-Version: 1.0 References: <20210215121713.57687-1-marcan@marcan.st> <20210215121713.57687-15-marcan@marcan.st> In-Reply-To: From: Arnd Bergmann Date: Tue, 16 Feb 2021 12:21:05 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 14/25] dt-bindings: interrupt-controller: Add DT bindings for apple-aic To: Mark Kettenis Cc: Hector Martin , Linux ARM , Marc Zyngier , Rob Herring , Olof Johansson , Krzysztof Kozlowski , Tony Lindgren , Mohamed Mediouni , Stan Skowronek , Alexander Graf , Will Deacon , Linus Walleij , Mark Rutland , DTML , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2021 at 12:00 PM Mark Kettenis wrote: > > From: Arnd Bergmann > > Date: Tue, 16 Feb 2021 10:41:11 +0100 > > > > On Mon, Feb 15, 2021 at 1:17 PM Hector Martin wrote: > > > + > > > + The 2nd cell contains the interrupt number. > > > + - HW IRQs: interrupt number > > > + - FIQs: > > > + - 0: physical HV timer > > > + - 1: virtual HV timer > > > + - 2: physical guest timer > > > + - 3: virtual guest timer > > > > I wonder if you could just model the FIQ as a single shared level interrupt > > (which is essentially what it is), and have every driver that uses it do a > > request_irq() on the same IRQ number. > > > > This would avoid having to come up with a fake binding for it, and simplify > > the implementation that then no longer has to peek into each interrupt > > source. > > That would tie the binding more closely to the implementation as it > would remove the option of peeking at the interrupt source. I don't think having the binding match the implementation is a bad thing ;-) If a future SoC variant handles it differently, it will need a binding update anyway. > And wouldn't it mean that the arch_timer driver would need to know whether > the interrupt is shared or not? Indeed, it does require each driver to pass IRQF_SHARED, and be prepared to be called when no irq is pending (returning IRQ_NONE otherwise), so a downside would be that this requires changing the bindings for the timer and anything else that ends up using FIQ later. It may be possible to just always pass IRQF_SHARED when registering the arch timer handler, not sure if there are any downsides in case for the normal (non-shared) case. This is a drawback, but I still find it a little cleaner than having to encode information about the individual irq sources into the irqchip driver. Arnd