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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74C6BC433F5 for ; Fri, 28 Jan 2022 15:09:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344190AbiA1PJ4 (ORCPT ); Fri, 28 Jan 2022 10:09:56 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:34934 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232320AbiA1PJz (ORCPT ); Fri, 28 Jan 2022 10:09:55 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0D85FB82613; Fri, 28 Jan 2022 15:09:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8BF0C340E0; Fri, 28 Jan 2022 15:09:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643382592; bh=BhSk2oPgIVJBVLRSfsk3+K/dzHQvwqKlSD+wl/eXM9c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FbzaI0HDHGIaA30B64poJ6Ghz1KSJGBZo7K12e1IZX2zLrYYyk+QoEWqtzAFy1JSG unae1i6DhrrQfGY2ZtnKYF62z43nwzfTCYKD1aLVzdorKloBqBqU3m28wDpQ9NOt2w DfjkLubi5kwWB428sGiu8DDGdiQAGG6tOXWwXiwwIGXT4Fv8ny+xskV61MlSj24hgk 2s7fUXQyNGRr8a7f0R9P8NVb+hRhMEDoDUjJP0bTk0V7RiziB+6vbDuve5shTjy63C ojnrZ/1WqSBZMvrJ2T4O5DiMD95/IuLXy+EYeBhCO+upPtxARcgHmSbvRQueWHd2/7 Q2lePsRAFimKw== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nDSso-003qPI-F4; Fri, 28 Jan 2022 15:09:50 +0000 Date: Fri, 28 Jan 2022 15:09:49 +0000 Message-ID: <87o83v6gn6.wl-maz@kernel.org> From: Marc Zyngier To: Bjorn Helgaas Cc: "qizhong.cheng" , Ryder Lee , Jianjun Wang , Lorenzo Pieralisi , Krzysztof =?UTF-8?B?V2lsY3p5xYRz?= =?UTF-8?B?a2k=?= , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chuanjia.liu@mediatek.com, Srikanth Thokala , Pratyush Anand , Thomas Petazzoni , Pali =?UTF-8?B?Um9ow6Fy?= Subject: Re: [PATCH] PCI: mediatek: Change MSI interrupt processing sequence In-Reply-To: <20220128131250.GA200007@bhelgaas> References: <87r18s5jbn.wl-maz@kernel.org> <20220128131250.GA200007@bhelgaas> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: helgaas@kernel.org, qizhong.cheng@mediatek.com, ryder.lee@mediatek.com, jianjun.wang@mediatek.com, lorenzo.pieralisi@arm.com, kw@linux.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chuanjia.liu@mediatek.com, srikanth.thokala@intel.com, pratyush.anand@gmail.com, thomas.petazzoni@bootlin.com, pali@kernel.org 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 On Fri, 28 Jan 2022 13:12:50 +0000, Bjorn Helgaas wrote: > > On Fri, Jan 28, 2022 at 08:57:16AM +0000, Marc Zyngier wrote: > > On Thu, 27 Jan 2022 21:21:00 +0000, > > Bjorn Helgaas wrote: > > Thanks a lot for taking a look at these, Marc! Is there anything we > can do to make all these drivers/pci/controller/* drivers more > consistent and easier to review? I found it very difficult to look > across all of them and find similar design patterns. It looks to me that a number of them are just wrapping the same underlying IP block, most likely the DW controller (this looks to be the case for at least the first two). They probably all use different register and bit offsets, but it should be possible to write a library abstracting all these details and have a common handling for most of them. This would certainly go a long way in making things more solid. M. -- Without deviation from the norm, progress is not possible. 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2EFBEC433EF for ; Fri, 28 Jan 2022 15:10:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8PVuDlwUxMwEGVajs2/tpmKbNWz4dMFBvsydBEhmoSY=; b=DpilehTTT/k1U5 IbPc/Du0mSBhq9gD5Sj0ZcgLKA+VzAsx+f0BZ/UTeN6b2SivJwCrht4VrGn6DImhJG1vEnfM+PEWK 8eAP75BDncGUusLyeZiMZWNsuWBxzi5TABjBX2A2Lt2jYWKeBns14Zifq8bnuK+QZUDFTgtsD+F5T JhBHabpYfuo0TQA/RHZrMpJk5FEiBWAnOh9TTTA77IA157qy+zi45fk940LZFHs4400lSKjU8CXbL n0c4M6J4TFhwrJmbn6KI+G7A7HmPm43a7Gs41PTixDB0FqheXyXBHnYJ0bBQEZBbzxNSvAVr8Ltc9 CViXdVBBZwsnzQieq1iQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDSt5-002efC-Pf; Fri, 28 Jan 2022 15:10:07 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDSst-002ec3-Ga; Fri, 28 Jan 2022 15:09:57 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 12805B82614; Fri, 28 Jan 2022 15:09:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8BF0C340E0; Fri, 28 Jan 2022 15:09:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643382592; bh=BhSk2oPgIVJBVLRSfsk3+K/dzHQvwqKlSD+wl/eXM9c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FbzaI0HDHGIaA30B64poJ6Ghz1KSJGBZo7K12e1IZX2zLrYYyk+QoEWqtzAFy1JSG unae1i6DhrrQfGY2ZtnKYF62z43nwzfTCYKD1aLVzdorKloBqBqU3m28wDpQ9NOt2w DfjkLubi5kwWB428sGiu8DDGdiQAGG6tOXWwXiwwIGXT4Fv8ny+xskV61MlSj24hgk 2s7fUXQyNGRr8a7f0R9P8NVb+hRhMEDoDUjJP0bTk0V7RiziB+6vbDuve5shTjy63C ojnrZ/1WqSBZMvrJ2T4O5DiMD95/IuLXy+EYeBhCO+upPtxARcgHmSbvRQueWHd2/7 Q2lePsRAFimKw== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nDSso-003qPI-F4; Fri, 28 Jan 2022 15:09:50 +0000 Date: Fri, 28 Jan 2022 15:09:49 +0000 Message-ID: <87o83v6gn6.wl-maz@kernel.org> From: Marc Zyngier To: Bjorn Helgaas Cc: "qizhong.cheng" , Ryder Lee , Jianjun Wang , Lorenzo Pieralisi , Krzysztof =?UTF-8?B?V2lsY3p5xYRz?= =?UTF-8?B?a2k=?= , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chuanjia.liu@mediatek.com, Srikanth Thokala , Pratyush Anand , Thomas Petazzoni , Pali =?UTF-8?B?Um9ow6Fy?= Subject: Re: [PATCH] PCI: mediatek: Change MSI interrupt processing sequence In-Reply-To: <20220128131250.GA200007@bhelgaas> References: <87r18s5jbn.wl-maz@kernel.org> <20220128131250.GA200007@bhelgaas> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: helgaas@kernel.org, qizhong.cheng@mediatek.com, ryder.lee@mediatek.com, jianjun.wang@mediatek.com, lorenzo.pieralisi@arm.com, kw@linux.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chuanjia.liu@mediatek.com, srikanth.thokala@intel.com, pratyush.anand@gmail.com, thomas.petazzoni@bootlin.com, pali@kernel.org 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-20220128_070955_854347_49F2F4BC X-CRM114-Status: GOOD ( 17.23 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Fri, 28 Jan 2022 13:12:50 +0000, Bjorn Helgaas wrote: > > On Fri, Jan 28, 2022 at 08:57:16AM +0000, Marc Zyngier wrote: > > On Thu, 27 Jan 2022 21:21:00 +0000, > > Bjorn Helgaas wrote: > > Thanks a lot for taking a look at these, Marc! Is there anything we > can do to make all these drivers/pci/controller/* drivers more > consistent and easier to review? I found it very difficult to look > across all of them and find similar design patterns. It looks to me that a number of them are just wrapping the same underlying IP block, most likely the DW controller (this looks to be the case for at least the first two). They probably all use different register and bit offsets, but it should be possible to write a library abstracting all these details and have a common handling for most of them. This would certainly go a long way in making things more solid. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2A34C433EF for ; Fri, 28 Jan 2022 15:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XtGR9aAQPAz50IJEH90BLQstR5RoNas27xtOHpxz7SM=; b=kG/t/m404Ghx6F hwZhS1/1Qm+4Qza1Vh10phgcIFrOH5jHBLHxQrk1fgn8xNEK4MLgaF6M04rNCbe8FCPd9eMLuRRIX UJcdz7pf79eTdTG1o/k6Ur/tHPqjWnSnKLMGDVckjKjXoFTL+CwhtF3t52cjJxxvjxsx9HcmCDxXz EqUMgUNZY5DEm5yOSjr66pwAcF4FaOPtAVNjhW/emf4uNeRdqbV3TIZoUTMv5I/9MXe9M/C1oas06 SGNRtua3/i5jhR2kP0S7yBEoJ/6RodwPVUaT4oH2blcqE5J/FXhj0N++0uBmfjnjhOOmcmZ1pCZUb kaGPYaPdikbPocD8+6dA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDSsx-002eeK-4k; Fri, 28 Jan 2022 15:09:59 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDSst-002ec3-Ga; Fri, 28 Jan 2022 15:09:57 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 12805B82614; Fri, 28 Jan 2022 15:09:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8BF0C340E0; Fri, 28 Jan 2022 15:09:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643382592; bh=BhSk2oPgIVJBVLRSfsk3+K/dzHQvwqKlSD+wl/eXM9c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FbzaI0HDHGIaA30B64poJ6Ghz1KSJGBZo7K12e1IZX2zLrYYyk+QoEWqtzAFy1JSG unae1i6DhrrQfGY2ZtnKYF62z43nwzfTCYKD1aLVzdorKloBqBqU3m28wDpQ9NOt2w DfjkLubi5kwWB428sGiu8DDGdiQAGG6tOXWwXiwwIGXT4Fv8ny+xskV61MlSj24hgk 2s7fUXQyNGRr8a7f0R9P8NVb+hRhMEDoDUjJP0bTk0V7RiziB+6vbDuve5shTjy63C ojnrZ/1WqSBZMvrJ2T4O5DiMD95/IuLXy+EYeBhCO+upPtxARcgHmSbvRQueWHd2/7 Q2lePsRAFimKw== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nDSso-003qPI-F4; Fri, 28 Jan 2022 15:09:50 +0000 Date: Fri, 28 Jan 2022 15:09:49 +0000 Message-ID: <87o83v6gn6.wl-maz@kernel.org> From: Marc Zyngier To: Bjorn Helgaas Cc: "qizhong.cheng" , Ryder Lee , Jianjun Wang , Lorenzo Pieralisi , Krzysztof =?UTF-8?B?V2lsY3p5xYRz?= =?UTF-8?B?a2k=?= , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chuanjia.liu@mediatek.com, Srikanth Thokala , Pratyush Anand , Thomas Petazzoni , Pali =?UTF-8?B?Um9ow6Fy?= Subject: Re: [PATCH] PCI: mediatek: Change MSI interrupt processing sequence In-Reply-To: <20220128131250.GA200007@bhelgaas> References: <87r18s5jbn.wl-maz@kernel.org> <20220128131250.GA200007@bhelgaas> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: helgaas@kernel.org, qizhong.cheng@mediatek.com, ryder.lee@mediatek.com, jianjun.wang@mediatek.com, lorenzo.pieralisi@arm.com, kw@linux.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chuanjia.liu@mediatek.com, srikanth.thokala@intel.com, pratyush.anand@gmail.com, thomas.petazzoni@bootlin.com, pali@kernel.org 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-20220128_070955_854347_49F2F4BC X-CRM114-Status: GOOD ( 17.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 28 Jan 2022 13:12:50 +0000, Bjorn Helgaas wrote: > > On Fri, Jan 28, 2022 at 08:57:16AM +0000, Marc Zyngier wrote: > > On Thu, 27 Jan 2022 21:21:00 +0000, > > Bjorn Helgaas wrote: > > Thanks a lot for taking a look at these, Marc! Is there anything we > can do to make all these drivers/pci/controller/* drivers more > consistent and easier to review? I found it very difficult to look > across all of them and find similar design patterns. It looks to me that a number of them are just wrapping the same underlying IP block, most likely the DW controller (this looks to be the case for at least the first two). They probably all use different register and bit offsets, but it should be possible to write a library abstracting all these details and have a common handling for most of them. This would certainly go a long way in making things more solid. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel