From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v2 03/22] MSI: Remove the redundant irq_set_chip_data() Date: Thu, 25 Sep 2014 09:19:20 +0200 Message-ID: <20140925071919.GH12423@ulmo> References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <1411614872-4009-4-git-send-email-wangyijing@huawei.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mhjHhnbe5PrRcwjY" Return-path: Received: from mail-wi0-f180.google.com ([209.85.212.180]:42317 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750871AbaIYHTY (ORCPT ); Thu, 25 Sep 2014 03:19:24 -0400 Content-Disposition: inline In-Reply-To: <1411614872-4009-4-git-send-email-wangyijing@huawei.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Yijing Wang Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Xinwei Hu , Wuyun , linux-arm-kernel@lists.infradead.org, Russell King , linux-arch@vger.kernel.org, arnab.basu@freescale.com, Bharat.Bhushan@freescale.com, x86@kernel.org, Arnd Bergmann , Thomas Gleixner , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-mips@linux-mips.org, Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Sebastian Ott , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org, Chris Metcalf --mhjHhnbe5PrRcwjY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 25, 2014 at 11:14:13AM +0800, Yijing Wang wrote: > Currently, pcie-designware, pcie-rcar, pci-tegra drivers > use irq chip_data to save the msi_chip pointer. They > already call irq_set_chip_data() in their own MSI irq map > functions. So irq_set_chip_data() in arch_setup_msi_irq() > is useless. Again, I think this should be the other way around. If drivers do something that's already handled by the core, then the duplicate code should be dropped from the drivers. Thierry --mhjHhnbe5PrRcwjY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUI8H3AAoJEN0jrNd/PrOhD9gP/irz9NSH3coHma+k59CgfNee Eadp8ruJoWHsk+kNc+VP4X8QUfFbawc4Y9GarISl2soj926zV/hj8I7CSKn7im1g OEWOG1+IoZY+1142DUhZRfqgw+kPIsHL2nKRK6RJCWhpIxIrh1f7/LcSyrWUbS9r 7t6FJUljEAZ4oSmW8FDuK4hrK9s53zIKQkvv2zfbOv7sAvnYuJM4r5EteKEkxVqy VEwvbqgS5Ccf4PKJKnISrCAV9z4H8kYF2PN0e7+8x9l6WOsdz5yEszOJmoREGMzG eCUaBYi7Tl7jAqdQkJfEePdK7BotGIbuffF2j76j1TTgOKp2HEoMlTxLv9SldxMa 9NoNSP5NzJzSyK6Pawx84xkhKnMd5TWLD7IMcDvfcMIbQ+IZiXDnNjQ9diG3RjhT zLyMRZc5MdOfL8ScPzrYYUATbIEFmJdB0rUZ6u9ivHdRsVqZ6pJbRz/C/QPfd92M dDXoVvcRDGGgaM66PbfYykArWhGI+hPG4ip3t5CpA2KLqLm9BapvqSc0H6V9y5w8 nuBHS0pk3mojCR9naMzuOy0nqME7SU9QiOiMMvv6uZztE2y3udRmkZNHX32DSi7l 6YLq84EA/LyOtPp9jrRH1eKZLty5qyY2mO9Le46GAragc909SMnKpNAWJyV+RLLm 9fhn8sFnEUFKzDPptCkB =WmVy -----END PGP SIGNATURE----- --mhjHhnbe5PrRcwjY-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f180.google.com ([209.85.212.180]:42317 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750871AbaIYHTY (ORCPT ); Thu, 25 Sep 2014 03:19:24 -0400 Date: Thu, 25 Sep 2014 09:19:20 +0200 From: Thierry Reding Subject: Re: [PATCH v2 03/22] MSI: Remove the redundant irq_set_chip_data() Message-ID: <20140925071919.GH12423@ulmo> References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <1411614872-4009-4-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mhjHhnbe5PrRcwjY" Content-Disposition: inline In-Reply-To: <1411614872-4009-4-git-send-email-wangyijing@huawei.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Yijing Wang Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Xinwei Hu , Wuyun , linux-arm-kernel@lists.infradead.org, Russell King , linux-arch@vger.kernel.org, arnab.basu@freescale.com, Bharat.Bhushan@freescale.com, x86@kernel.org, Arnd Bergmann , Thomas Gleixner , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-mips@linux-mips.org, Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Sebastian Ott , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org, Chris Metcalf , Ralf Baechle , Lucas Stach , David Vrabel , Sergei Shtylyov , Michael Ellerman , Thomas Petazzoni Message-ID: <20140925071920.4HgZV9q7NrquTs2z3rA1CE2HULzK9wpEF4O59NZ3zus@z> --mhjHhnbe5PrRcwjY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 25, 2014 at 11:14:13AM +0800, Yijing Wang wrote: > Currently, pcie-designware, pcie-rcar, pci-tegra drivers > use irq chip_data to save the msi_chip pointer. They > already call irq_set_chip_data() in their own MSI irq map > functions. So irq_set_chip_data() in arch_setup_msi_irq() > is useless. Again, I think this should be the other way around. If drivers do something that's already handled by the core, then the duplicate code should be dropped from the drivers. Thierry --mhjHhnbe5PrRcwjY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUI8H3AAoJEN0jrNd/PrOhD9gP/irz9NSH3coHma+k59CgfNee Eadp8ruJoWHsk+kNc+VP4X8QUfFbawc4Y9GarISl2soj926zV/hj8I7CSKn7im1g OEWOG1+IoZY+1142DUhZRfqgw+kPIsHL2nKRK6RJCWhpIxIrh1f7/LcSyrWUbS9r 7t6FJUljEAZ4oSmW8FDuK4hrK9s53zIKQkvv2zfbOv7sAvnYuJM4r5EteKEkxVqy VEwvbqgS5Ccf4PKJKnISrCAV9z4H8kYF2PN0e7+8x9l6WOsdz5yEszOJmoREGMzG eCUaBYi7Tl7jAqdQkJfEePdK7BotGIbuffF2j76j1TTgOKp2HEoMlTxLv9SldxMa 9NoNSP5NzJzSyK6Pawx84xkhKnMd5TWLD7IMcDvfcMIbQ+IZiXDnNjQ9diG3RjhT zLyMRZc5MdOfL8ScPzrYYUATbIEFmJdB0rUZ6u9ivHdRsVqZ6pJbRz/C/QPfd92M dDXoVvcRDGGgaM66PbfYykArWhGI+hPG4ip3t5CpA2KLqLm9BapvqSc0H6V9y5w8 nuBHS0pk3mojCR9naMzuOy0nqME7SU9QiOiMMvv6uZztE2y3udRmkZNHX32DSi7l 6YLq84EA/LyOtPp9jrRH1eKZLty5qyY2mO9Le46GAragc909SMnKpNAWJyV+RLLm 9fhn8sFnEUFKzDPptCkB =WmVy -----END PGP SIGNATURE----- --mhjHhnbe5PrRcwjY-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Date: Thu, 25 Sep 2014 07:19:20 +0000 Subject: Re: [PATCH v2 03/22] MSI: Remove the redundant irq_set_chip_data() Message-Id: <20140925071919.GH12423@ulmo> MIME-Version: 1 Content-Type: multipart/mixed; boundary="mhjHhnbe5PrRcwjY" List-Id: References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <1411614872-4009-4-git-send-email-wangyijing@huawei.com> In-Reply-To: <1411614872-4009-4-git-send-email-wangyijing@huawei.com> To: Yijing Wang Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Xinwei Hu , Wuyun , linux-arm-kernel@lists.infradead.org, Russell King , linux-arch@vger.kernel.org, arnab.basu@freescale.com, Bharat.Bhushan@freescale.com, x86@kernel.org, Arnd Bergmann , Thomas Gleixner , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-mips@linux-mips.org, Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Sebastian Ott , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org, Chris Metcalf , Ralf Baechle , Lucas Stach , David Vrabel , Sergei Shtylyov , Michael Ellerman , Thomas Petazzoni --mhjHhnbe5PrRcwjY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 25, 2014 at 11:14:13AM +0800, Yijing Wang wrote: > Currently, pcie-designware, pcie-rcar, pci-tegra drivers > use irq chip_data to save the msi_chip pointer. They > already call irq_set_chip_data() in their own MSI irq map > functions. So irq_set_chip_data() in arch_setup_msi_irq() > is useless. Again, I think this should be the other way around. If drivers do something that's already handled by the core, then the duplicate code should be dropped from the drivers. Thierry --mhjHhnbe5PrRcwjY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUI8H3AAoJEN0jrNd/PrOhD9gP/irz9NSH3coHma+k59CgfNee Eadp8ruJoWHsk+kNc+VP4X8QUfFbawc4Y9GarISl2soj926zV/hj8I7CSKn7im1g OEWOG1+IoZY+1142DUhZRfqgw+kPIsHL2nKRK6RJCWhpIxIrh1f7/LcSyrWUbS9r 7t6FJUljEAZ4oSmW8FDuK4hrK9s53zIKQkvv2zfbOv7sAvnYuJM4r5EteKEkxVqy VEwvbqgS5Ccf4PKJKnISrCAV9z4H8kYF2PN0e7+8x9l6WOsdz5yEszOJmoREGMzG eCUaBYi7Tl7jAqdQkJfEePdK7BotGIbuffF2j76j1TTgOKp2HEoMlTxLv9SldxMa 9NoNSP5NzJzSyK6Pawx84xkhKnMd5TWLD7IMcDvfcMIbQ+IZiXDnNjQ9diG3RjhT zLyMRZc5MdOfL8ScPzrYYUATbIEFmJdB0rUZ6u9ivHdRsVqZ6pJbRz/C/QPfd92M dDXoVvcRDGGgaM66PbfYykArWhGI+hPG4ip3t5CpA2KLqLm9BapvqSc0H6V9y5w8 nuBHS0pk3mojCR9naMzuOy0nqME7SU9QiOiMMvv6uZztE2y3udRmkZNHX32DSi7l 6YLq84EA/LyOtPp9jrRH1eKZLty5qyY2mO9Le46GAragc909SMnKpNAWJyV+RLLm 9fhn8sFnEUFKzDPptCkB =WmVy -----END PGP SIGNATURE----- --mhjHhnbe5PrRcwjY-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 7D5B01A0163 for ; Thu, 25 Sep 2014 17:19:26 +1000 (EST) Received: by mail-wi0-f178.google.com with SMTP id z2so8729083wiv.11 for ; Thu, 25 Sep 2014 00:19:22 -0700 (PDT) Date: Thu, 25 Sep 2014 09:19:20 +0200 From: Thierry Reding To: Yijing Wang Subject: Re: [PATCH v2 03/22] MSI: Remove the redundant irq_set_chip_data() Message-ID: <20140925071919.GH12423@ulmo> References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <1411614872-4009-4-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mhjHhnbe5PrRcwjY" In-Reply-To: <1411614872-4009-4-git-send-email-wangyijing@huawei.com> Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-pci@vger.kernel.org, Bharat.Bhushan@freescale.com, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Russell King , Joerg Roedel , x86@kernel.org, Sebastian Ott , xen-devel@lists.xenproject.org, arnab.basu@freescale.com, Arnd Bergmann , Konrad Rzeszutek Wilk , Chris Metcalf , Bjorn Helgaas , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , Xinwei Hu , Tony Luck , Sergei Shtylyov , linux-kernel@vger.kernel.org, Ralf Baechle , iommu@lists.linux-foundation.org, David Vrabel , Wuyun , linuxppc-dev@lists.ozlabs.org, "David S. Miller" , Lucas Stach List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --mhjHhnbe5PrRcwjY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 25, 2014 at 11:14:13AM +0800, Yijing Wang wrote: > Currently, pcie-designware, pcie-rcar, pci-tegra drivers > use irq chip_data to save the msi_chip pointer. They > already call irq_set_chip_data() in their own MSI irq map > functions. So irq_set_chip_data() in arch_setup_msi_irq() > is useless. Again, I think this should be the other way around. If drivers do something that's already handled by the core, then the duplicate code should be dropped from the drivers. Thierry --mhjHhnbe5PrRcwjY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUI8H3AAoJEN0jrNd/PrOhD9gP/irz9NSH3coHma+k59CgfNee Eadp8ruJoWHsk+kNc+VP4X8QUfFbawc4Y9GarISl2soj926zV/hj8I7CSKn7im1g OEWOG1+IoZY+1142DUhZRfqgw+kPIsHL2nKRK6RJCWhpIxIrh1f7/LcSyrWUbS9r 7t6FJUljEAZ4oSmW8FDuK4hrK9s53zIKQkvv2zfbOv7sAvnYuJM4r5EteKEkxVqy VEwvbqgS5Ccf4PKJKnISrCAV9z4H8kYF2PN0e7+8x9l6WOsdz5yEszOJmoREGMzG eCUaBYi7Tl7jAqdQkJfEePdK7BotGIbuffF2j76j1TTgOKp2HEoMlTxLv9SldxMa 9NoNSP5NzJzSyK6Pawx84xkhKnMd5TWLD7IMcDvfcMIbQ+IZiXDnNjQ9diG3RjhT zLyMRZc5MdOfL8ScPzrYYUATbIEFmJdB0rUZ6u9ivHdRsVqZ6pJbRz/C/QPfd92M dDXoVvcRDGGgaM66PbfYykArWhGI+hPG4ip3t5CpA2KLqLm9BapvqSc0H6V9y5w8 nuBHS0pk3mojCR9naMzuOy0nqME7SU9QiOiMMvv6uZztE2y3udRmkZNHX32DSi7l 6YLq84EA/LyOtPp9jrRH1eKZLty5qyY2mO9Le46GAragc909SMnKpNAWJyV+RLLm 9fhn8sFnEUFKzDPptCkB =WmVy -----END PGP SIGNATURE----- --mhjHhnbe5PrRcwjY-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Date: Thu, 25 Sep 2014 07:19:20 +0000 Subject: Re: [PATCH v2 03/22] MSI: Remove the redundant irq_set_chip_data() Message-Id: <20140925071919.GH12423@ulmo> MIME-Version: 1 Content-Type: multipart/mixed; boundary="mhjHhnbe5PrRcwjY" List-Id: References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <1411614872-4009-4-git-send-email-wangyijing@huawei.com> In-Reply-To: <1411614872-4009-4-git-send-email-wangyijing@huawei.com> To: Yijing Wang Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Xinwei Hu , Wuyun , linux-arm-kernel@lists.infradead.org, Russell King , linux-arch@vger.kernel.org, arnab.basu@freescale.com, Bharat.Bhushan@freescale.com, x86@kernel.org, Arnd Bergmann , Thomas Gleixner , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-mips@linux-mips.org, Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Sebastian Ott , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org, Chris Metcalf --mhjHhnbe5PrRcwjY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 25, 2014 at 11:14:13AM +0800, Yijing Wang wrote: > Currently, pcie-designware, pcie-rcar, pci-tegra drivers > use irq chip_data to save the msi_chip pointer. They > already call irq_set_chip_data() in their own MSI irq map > functions. So irq_set_chip_data() in arch_setup_msi_irq() > is useless. Again, I think this should be the other way around. If drivers do something that's already handled by the core, then the duplicate code should be dropped from the drivers. Thierry --mhjHhnbe5PrRcwjY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUI8H3AAoJEN0jrNd/PrOhD9gP/irz9NSH3coHma+k59CgfNee Eadp8ruJoWHsk+kNc+VP4X8QUfFbawc4Y9GarISl2soj926zV/hj8I7CSKn7im1g OEWOG1+IoZY+1142DUhZRfqgw+kPIsHL2nKRK6RJCWhpIxIrh1f7/LcSyrWUbS9r 7t6FJUljEAZ4oSmW8FDuK4hrK9s53zIKQkvv2zfbOv7sAvnYuJM4r5EteKEkxVqy VEwvbqgS5Ccf4PKJKnISrCAV9z4H8kYF2PN0e7+8x9l6WOsdz5yEszOJmoREGMzG eCUaBYi7Tl7jAqdQkJfEePdK7BotGIbuffF2j76j1TTgOKp2HEoMlTxLv9SldxMa 9NoNSP5NzJzSyK6Pawx84xkhKnMd5TWLD7IMcDvfcMIbQ+IZiXDnNjQ9diG3RjhT zLyMRZc5MdOfL8ScPzrYYUATbIEFmJdB0rUZ6u9ivHdRsVqZ6pJbRz/C/QPfd92M dDXoVvcRDGGgaM66PbfYykArWhGI+hPG4ip3t5CpA2KLqLm9BapvqSc0H6V9y5w8 nuBHS0pk3mojCR9naMzuOy0nqME7SU9QiOiMMvv6uZztE2y3udRmkZNHX32DSi7l 6YLq84EA/LyOtPp9jrRH1eKZLty5qyY2mO9Le46GAragc909SMnKpNAWJyV+RLLm 9fhn8sFnEUFKzDPptCkB =WmVy -----END PGP SIGNATURE----- --mhjHhnbe5PrRcwjY-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: thierry.reding@gmail.com (Thierry Reding) Date: Thu, 25 Sep 2014 09:19:20 +0200 Subject: [PATCH v2 03/22] MSI: Remove the redundant irq_set_chip_data() In-Reply-To: <1411614872-4009-4-git-send-email-wangyijing@huawei.com> References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <1411614872-4009-4-git-send-email-wangyijing@huawei.com> Message-ID: <20140925071919.GH12423@ulmo> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Sep 25, 2014 at 11:14:13AM +0800, Yijing Wang wrote: > Currently, pcie-designware, pcie-rcar, pci-tegra drivers > use irq chip_data to save the msi_chip pointer. They > already call irq_set_chip_data() in their own MSI irq map > functions. So irq_set_chip_data() in arch_setup_msi_irq() > is useless. Again, I think this should be the other way around. If drivers do something that's already handled by the core, then the duplicate code should be dropped from the drivers. Thierry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: