From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4E1BC433E0 for ; Wed, 10 Feb 2021 15:31:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 72DD264DDA for ; Wed, 10 Feb 2021 15:31:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232091AbhBJPbg (ORCPT ); Wed, 10 Feb 2021 10:31:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:47720 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229888AbhBJPb2 (ORCPT ); Wed, 10 Feb 2021 10:31:28 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (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 F0EB864E45; Wed, 10 Feb 2021 15:30:47 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1l9rS1-00DMb5-Nz; Wed, 10 Feb 2021 15:30:45 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 10 Feb 2021 15:30:45 +0000 From: Marc Zyngier To: Maxime Ripard Cc: Dave Stevenson , Thomas Gleixner , Eric Anholt , Maarten Lankhorst , Thomas Zimmermann , Daniel Vetter , David Airlie , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Hans Verkuil , LKML , DRI Development , bcm-kernel-feedback-list@broadcom.com, Mauro Carvalho Chehab , Linux Media Mailing List , Florian Fainelli , Nicolas Saenz Julienne Subject: Re: [PATCH v2 14/15] ARM: dts: bcm2711: Add the BSC interrupt controller In-Reply-To: <20210210144043.s4plyc7ekwnnu7k4@gilmour> References: <20210111142309.193441-1-maxime@cerno.tech> <20210111142309.193441-15-maxime@cerno.tech> <20210210144043.s4plyc7ekwnnu7k4@gilmour> User-Agent: Roundcube Webmail/1.4.10 Message-ID: <9d868bf76072fee7838b6f2ff73a575c@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: maxime@cerno.tech, dave.stevenson@raspberrypi.com, tglx@linutronix.de, eric@anholt.net, maarten.lankhorst@linux.intel.com, tzimmermann@suse.de, daniel.vetter@intel.com, airlied@linux.ie, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, hverkuil-cisco@xs4all.nl, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, mchehab@kernel.org, linux-media@vger.kernel.org, f.fainelli@gmail.com, nsaenzjulienne@suse.de X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Maxime, On 2021-02-10 14:40, Maxime Ripard wrote: > Hi Dave, > > On Tue, Feb 09, 2021 at 09:49:05AM +0000, Dave Stevenson wrote: >> On Mon, 11 Jan 2021 at 14:23, Maxime Ripard wrote: >> > >> > The BSC controllers used for the HDMI DDC have an interrupt controller >> > shared between both instances. Let's add it to avoid polling. >> >> This seems to have unintended side effects. >> GIC interrupt 117 is shared between the standard I2C controllers >> (i2c-bcm2835) and the l2-intc block handling the HDMI I2C interrupts. >> >> Whilst i2c-bcm2835 requests the interrupt with IRQF_SHARED, that >> doesn't appear to be an option for l2-intc registering as an interrupt >> controller. i2c-bcm2835 therefore loses out and fails to register for >> the interrupt. >> >> Is there an equivalent flag that an interrupt controller can add to >> say that the parent interrupt is shared? Is that even supported? > > Indeed, it looks like setting an equivalent to IRQF_SHARED would be the > solution, but I couldn't find anything that would allow us to in the > irqchip code. > > Marc, Thomas, is it something that is allowed? No, not really. That's because the chained handler is actually an interrupt flow, and not a normal handler. IRQF_SHARED acts at the wrong level for that. I can see two possibilities: - the l2-intc gets turned into a normal handler, and does the demux from there. Horrible stuff. - the i2c controller gets parented to the l2c-int as a fake interrupt, and gets called from there. Horrible stuff. Pick your poison... :-/ M. -- Jazz is not dead. It just smells funny... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43384C433DB for ; Wed, 10 Feb 2021 15:32:16 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D7E3864DDA for ; Wed, 10 Feb 2021 15:32:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D7E3864DDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IbUqgvmp8ywMtXviCABLHKCHiFMsa6QxRL+1zob7hB0=; b=2Qkdhkd55A8CyIsRcJuRdmpLV 7SRTJXcB8whYgGST9nkjTwFTOOYeoe7PgyOu466ZGWtOAR1GKLwVrIvT656DLDBh3bGqJh1jhK4of FNKo0FEH3kU+tuW2ZhG8jjoTkJBrHg7vCM0ABa2HlqHfxaxFNEEivEfC4UrSvuJ0wc1zMyQmraJn5 P7wdSt3mjqklolyV78Be3DEXHk1RE9KtnMhADDAXIKCEFfgXadeC41Y9LSYHmXfeBg7hSyonFrYrd Gpd+FgtsumHKN/hJaDHL29x4lsdWokBeIccKJDovZiu6JuO7KSKwmM0Izu1LrXW3fp/cqBn5wzSHJ cKWD5e7kA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9rS9-0001gh-TU; Wed, 10 Feb 2021 15:30:54 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9rS6-0001ek-Du; Wed, 10 Feb 2021 15:30:51 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (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 F0EB864E45; Wed, 10 Feb 2021 15:30:47 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1l9rS1-00DMb5-Nz; Wed, 10 Feb 2021 15:30:45 +0000 MIME-Version: 1.0 Date: Wed, 10 Feb 2021 15:30:45 +0000 From: Marc Zyngier To: Maxime Ripard Subject: Re: [PATCH v2 14/15] ARM: dts: bcm2711: Add the BSC interrupt controller In-Reply-To: <20210210144043.s4plyc7ekwnnu7k4@gilmour> References: <20210111142309.193441-1-maxime@cerno.tech> <20210111142309.193441-15-maxime@cerno.tech> <20210210144043.s4plyc7ekwnnu7k4@gilmour> User-Agent: Roundcube Webmail/1.4.10 Message-ID: <9d868bf76072fee7838b6f2ff73a575c@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: maxime@cerno.tech, dave.stevenson@raspberrypi.com, tglx@linutronix.de, eric@anholt.net, maarten.lankhorst@linux.intel.com, tzimmermann@suse.de, daniel.vetter@intel.com, airlied@linux.ie, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, hverkuil-cisco@xs4all.nl, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, mchehab@kernel.org, linux-media@vger.kernel.org, f.fainelli@gmail.com, nsaenzjulienne@suse.de X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210210_103050_673786_C6E3689B X-CRM114-Status: GOOD ( 22.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , Dave Stevenson , David Airlie , Nicolas Saenz Julienne , Maarten Lankhorst , LKML , DRI Development , Eric Anholt , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Thomas Zimmermann , Hans Verkuil , Daniel Vetter , Thomas Gleixner , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, Linux Media Mailing List Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Maxime, On 2021-02-10 14:40, Maxime Ripard wrote: > Hi Dave, > > On Tue, Feb 09, 2021 at 09:49:05AM +0000, Dave Stevenson wrote: >> On Mon, 11 Jan 2021 at 14:23, Maxime Ripard wrote: >> > >> > The BSC controllers used for the HDMI DDC have an interrupt controller >> > shared between both instances. Let's add it to avoid polling. >> >> This seems to have unintended side effects. >> GIC interrupt 117 is shared between the standard I2C controllers >> (i2c-bcm2835) and the l2-intc block handling the HDMI I2C interrupts. >> >> Whilst i2c-bcm2835 requests the interrupt with IRQF_SHARED, that >> doesn't appear to be an option for l2-intc registering as an interrupt >> controller. i2c-bcm2835 therefore loses out and fails to register for >> the interrupt. >> >> Is there an equivalent flag that an interrupt controller can add to >> say that the parent interrupt is shared? Is that even supported? > > Indeed, it looks like setting an equivalent to IRQF_SHARED would be the > solution, but I couldn't find anything that would allow us to in the > irqchip code. > > Marc, Thomas, is it something that is allowed? No, not really. That's because the chained handler is actually an interrupt flow, and not a normal handler. IRQF_SHARED acts at the wrong level for that. I can see two possibilities: - the l2-intc gets turned into a normal handler, and does the demux from there. Horrible stuff. - the i2c controller gets parented to the l2c-int as a fake interrupt, and gets called from there. Horrible stuff. Pick your poison... :-/ M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2482EC433DB for ; Wed, 10 Feb 2021 15:30:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B240464DEC for ; Wed, 10 Feb 2021 15:30:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B240464DEC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E29CC6E30C; Wed, 10 Feb 2021 15:30:48 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5B11E6E30C for ; Wed, 10 Feb 2021 15:30:48 +0000 (UTC) Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (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 F0EB864E45; Wed, 10 Feb 2021 15:30:47 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1l9rS1-00DMb5-Nz; Wed, 10 Feb 2021 15:30:45 +0000 MIME-Version: 1.0 Date: Wed, 10 Feb 2021 15:30:45 +0000 From: Marc Zyngier To: Maxime Ripard Subject: Re: [PATCH v2 14/15] ARM: dts: bcm2711: Add the BSC interrupt controller In-Reply-To: <20210210144043.s4plyc7ekwnnu7k4@gilmour> References: <20210111142309.193441-1-maxime@cerno.tech> <20210111142309.193441-15-maxime@cerno.tech> <20210210144043.s4plyc7ekwnnu7k4@gilmour> User-Agent: Roundcube Webmail/1.4.10 Message-ID: <9d868bf76072fee7838b6f2ff73a575c@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: maxime@cerno.tech, dave.stevenson@raspberrypi.com, tglx@linutronix.de, eric@anholt.net, maarten.lankhorst@linux.intel.com, tzimmermann@suse.de, daniel.vetter@intel.com, airlied@linux.ie, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, hverkuil-cisco@xs4all.nl, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, mchehab@kernel.org, linux-media@vger.kernel.org, f.fainelli@gmail.com, nsaenzjulienne@suse.de X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , Dave Stevenson , David Airlie , Nicolas Saenz Julienne , LKML , DRI Development , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Thomas Zimmermann , Hans Verkuil , Daniel Vetter , Thomas Gleixner , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, Linux Media Mailing List Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Maxime, On 2021-02-10 14:40, Maxime Ripard wrote: > Hi Dave, > > On Tue, Feb 09, 2021 at 09:49:05AM +0000, Dave Stevenson wrote: >> On Mon, 11 Jan 2021 at 14:23, Maxime Ripard wrote: >> > >> > The BSC controllers used for the HDMI DDC have an interrupt controller >> > shared between both instances. Let's add it to avoid polling. >> >> This seems to have unintended side effects. >> GIC interrupt 117 is shared between the standard I2C controllers >> (i2c-bcm2835) and the l2-intc block handling the HDMI I2C interrupts. >> >> Whilst i2c-bcm2835 requests the interrupt with IRQF_SHARED, that >> doesn't appear to be an option for l2-intc registering as an interrupt >> controller. i2c-bcm2835 therefore loses out and fails to register for >> the interrupt. >> >> Is there an equivalent flag that an interrupt controller can add to >> say that the parent interrupt is shared? Is that even supported? > > Indeed, it looks like setting an equivalent to IRQF_SHARED would be the > solution, but I couldn't find anything that would allow us to in the > irqchip code. > > Marc, Thomas, is it something that is allowed? No, not really. That's because the chained handler is actually an interrupt flow, and not a normal handler. IRQF_SHARED acts at the wrong level for that. I can see two possibilities: - the l2-intc gets turned into a normal handler, and does the demux from there. Horrible stuff. - the i2c controller gets parented to the l2c-int as a fake interrupt, and gets called from there. Horrible stuff. Pick your poison... :-/ M. -- Jazz is not dead. It just smells funny... _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel