From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751100AbdEaSti (ORCPT ); Wed, 31 May 2017 14:49:38 -0400 Received: from smtp2-g21.free.fr ([212.27.42.2]:18848 "EHLO smtp2-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750952AbdEaStg (ORCPT ); Wed, 31 May 2017 14:49:36 -0400 Subject: Re: [PATCH v4 1/2] PCI: Add tango MSI controller support To: Bjorn Helgaas Cc: Marc Zyngier , Robin Murphy , Marc Gonzalez , Thomas Gleixner , Lorenzo Pieralisi , Liviu Dudau , David Laight , linux-pci , Linux ARM , LKML References: <1f6b50c7-4887-838e-8c7d-c014d82b6d8e@sigmadesigns.com> <8e56647d-3b2d-9bfc-b59e-79a2efaa7826@sigmadesigns.com> <20170523170319.GB24431@bhelgaas-glaptop.roam.corp.google.com> <20170531173414.GB4496@bhelgaas-glaptop.roam.corp.google.com> From: Mason Message-ID: <4885137f-7c1c-5742-4f66-f48c32ce7abb@free.fr> Date: Wed, 31 May 2017 20:49:04 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49 MIME-Version: 1.0 In-Reply-To: <20170531173414.GB4496@bhelgaas-glaptop.roam.corp.google.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/05/2017 19:34, Bjorn Helgaas wrote: > On Wed, May 31, 2017 at 04:18:44PM +0200, Mason wrote: > >> For the record, below is the patch I had in mind: >> >> diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c >> index 8a3e872798f3..edfc95575a37 100644 >> --- a/kernel/irq/msi.c >> +++ b/kernel/irq/msi.c >> @@ -91,9 +91,11 @@ int msi_domain_set_affinity(struct irq_data *irq_data, >> { >> struct irq_data *parent = irq_data->parent_data; >> struct msi_msg msg; >> - int ret; >> + int ret = -EINVAL; >> + >> + if (parent->chip->irq_set_affinity) >> + ret = parent->chip->irq_set_affinity(parent, mask, force); >> >> - ret = parent->chip->irq_set_affinity(parent, mask, force); >> if (ret >= 0 && ret != IRQ_SET_MASK_OK_DONE) { >> BUG_ON(irq_chip_compose_msi_msg(irq_data, &msg)); >> irq_chip_write_msi_msg(irq_data, &msg); >> >> >> >> Then, it would be safe to remove "do-nothing" .irq_set_affinity >> callbacks in drivers/pci/host > > I assume it's obvious that nobody else is going to take this and run > with it, so nothing will happen with this unless you finish it up by > doing the cleanup (removing the "do-nothing" callbacks) and adding a > changelog and signed-off-by. Smirk. > This would be more an IRQ patch than a PCI patch, but if I were > reviewing it, I would look for assurance that *all* the no-op > .irq_set_affinity callbacks were cleaned up, not just those in > drivers/pci/host. Are you saying the patch is *wrong* if not all "do-nothing" callbacks are cleaned up? Regards. From mboxrd@z Thu Jan 1 00:00:00 1970 From: slash.tmp@free.fr (Mason) Date: Wed, 31 May 2017 20:49:04 +0200 Subject: [PATCH v4 1/2] PCI: Add tango MSI controller support In-Reply-To: <20170531173414.GB4496@bhelgaas-glaptop.roam.corp.google.com> References: <1f6b50c7-4887-838e-8c7d-c014d82b6d8e@sigmadesigns.com> <8e56647d-3b2d-9bfc-b59e-79a2efaa7826@sigmadesigns.com> <20170523170319.GB24431@bhelgaas-glaptop.roam.corp.google.com> <20170531173414.GB4496@bhelgaas-glaptop.roam.corp.google.com> Message-ID: <4885137f-7c1c-5742-4f66-f48c32ce7abb@free.fr> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 31/05/2017 19:34, Bjorn Helgaas wrote: > On Wed, May 31, 2017 at 04:18:44PM +0200, Mason wrote: > >> For the record, below is the patch I had in mind: >> >> diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c >> index 8a3e872798f3..edfc95575a37 100644 >> --- a/kernel/irq/msi.c >> +++ b/kernel/irq/msi.c >> @@ -91,9 +91,11 @@ int msi_domain_set_affinity(struct irq_data *irq_data, >> { >> struct irq_data *parent = irq_data->parent_data; >> struct msi_msg msg; >> - int ret; >> + int ret = -EINVAL; >> + >> + if (parent->chip->irq_set_affinity) >> + ret = parent->chip->irq_set_affinity(parent, mask, force); >> >> - ret = parent->chip->irq_set_affinity(parent, mask, force); >> if (ret >= 0 && ret != IRQ_SET_MASK_OK_DONE) { >> BUG_ON(irq_chip_compose_msi_msg(irq_data, &msg)); >> irq_chip_write_msi_msg(irq_data, &msg); >> >> >> >> Then, it would be safe to remove "do-nothing" .irq_set_affinity >> callbacks in drivers/pci/host > > I assume it's obvious that nobody else is going to take this and run > with it, so nothing will happen with this unless you finish it up by > doing the cleanup (removing the "do-nothing" callbacks) and adding a > changelog and signed-off-by. Smirk. > This would be more an IRQ patch than a PCI patch, but if I were > reviewing it, I would look for assurance that *all* the no-op > .irq_set_affinity callbacks were cleaned up, not just those in > drivers/pci/host. Are you saying the patch is *wrong* if not all "do-nothing" callbacks are cleaned up? Regards.