mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Michael Ellerman <michael@ellerman.id.au>
Cc: linux-pci@atrey.karlin.mff.cuni.cz,
	Greg Kroah-Hartman <greg@kroah.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"David S. Miller" <davem@davemloft.net>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	<linux-kernel@vger.kernel.org>, Andrew Morton <akpm@osdl.org>,
	<daniel.e.wolstenholme@intel.com>
Subject: Re: [PATCH 16/21] MSI: arch should connect the irq and the msi_desc desc when it's ready
Date: Wed, 28 Mar 2007 06:15:37 -0600	[thread overview]
Message-ID: <m1bqidr2c6.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20070322105344.312FEDDF70@ozlabs.org> (Michael Ellerman's message of "Thu, 22 Mar 2007 21:51:42 +1100")

Michael Ellerman <michael@ellerman.id.au> writes:

> set_irq_msi() currently connects an irq_desc to an msi_desc. The archs call
> it at some point in their setup routine, and then the generic code sets up the
> reverse mapping from the msi_desc back to the irq.
>
> set_irq_msi() should really do both connections, making it the one and only
> call required to connect an irq with it's MSI desc.

Hmm.  This comment should be a little more forceful than a suggestion
to make ti clear you have made that change somewhere in this
patch.

> It should be the arch code that calls set_irq_msi(), and it should do so
> only once it's sure it's not going to fail the irq allocation.
>
> Given that there's no need for the arch to return the irq anymore, the return
> value from the arch setup routine just becomes 0 for success and !0 for
> failure.

Call it negative for failure, or possibly nonzero.  !0 == 1  Which
isn't what you meant, and is confusing comparing it to the code.

Ok.  This is likely me limit of picking on your patches for tonight.



> Index: msi-new/arch/ia64/kernel/msi_ia64.c
> ===================================================================
> --- msi-new.orig/arch/ia64/kernel/msi_ia64.c
> +++ msi-new/arch/ia64/kernel/msi_ia64.c
> @@ -74,7 +74,6 @@ int ia64_setup_msi_irq(struct pci_dev *p
>  	if (irq < 0)
>  		return irq;
>  
> -	set_irq_msi(irq, desc);
>  	dest_phys_id = cpu_physical_id(first_cpu(cpu_online_map));
>  	vector = irq;
>  
> @@ -91,11 +90,13 @@ int ia64_setup_msi_irq(struct pci_dev *p
>  		MSI_DATA_DELIVERY_FIXED |
>  		MSI_DATA_VECTOR(vector);
>  
> +	desc->irq = irq;
Setting desc->irq just before set_irq_msi appears redundant here.
> +	set_irq_msi(irq, desc);
>  	set_irq_chip_and_handler(irq, &ia64_msi_chip, handle_edge_irq);
>  	get_irq_chip(irq)->mask(irq);
>  	write_msi_msg(irq, &msg);
>  
> -	return irq;
> +	return 0;
>  }
>  
>  void ia64_teardown_msi_irq(unsigned int irq)

Eric

           reply	other threads:[~2007-03-28 12:16 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20070322105344.312FEDDF70@ozlabs.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1bqidr2c6.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=daniel.e.wolstenholme@intel.com \
    --cc=davem@davemloft.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=michael@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®